📄 tour de france.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0074)http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1097 -->
<HTML><HEAD><TITLE>Tour de France</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=pragma content=no-cache>
<META http-equiv=cache-control content=no-cache>
<META http-equiv=expires content=0>
<META http-equiv=keywords content=keyword1,keyword2,keyword3>
<META http-equiv=description content="This is my page"><!--
<link rel="stylesheet" type="text/css" href="styles.css">
--><LINK media=screen href="Tour de France.files/global.css" type=text/css
rel=stylesheet><LINK media=screen href="Tour de France.files/nicetabs.css"
type=text/css rel=stylesheet>
<SCRIPT src="Tour de France.files/nicetabs.js" type=text/javascript></SCRIPT>
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY id=nicetabs>
<TABLE height=80 cellSpacing=0 cellPadding=0 width="50%" border=0>
<TBODY>
<TR>
<TD><IMG src="Tour de France.files/logo3.jpg"></TD>
<TD width="20%">
<TABLE width="100%" border=0>
<TBODY>
<TR>
<TD>
<DIV align=center><A
href="http://acm.nuaa.edu.cn/acmhome/locale.do?language=en">English</A>
</DIV></TD>
<TD>
<DIV align=center><A
href="http://acm.nuaa.edu.cn/acmhome/locale.do?language=cn">中文</A>
</DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE height=40 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="20%">
<DIV id=header>
<UL class=menuList>
<LI><A title=暂退赛场 href="http://acm.nuaa.edu.cn/acmhome">暂退赛场</A>
</LI></UL></DIV></TD>
<TD width="20%">
<DIV id=header>
<UL class=menuList>
<LI><A title=比赛主页
href="http://acm.nuaa.edu.cn/acmhome/contest.do?&method=contestDetail&contestId=23">比赛主页</A>
</LI></UL></DIV></TD>
<TD width="20%">
<DIV id=header>
<UL class=menuList>
<LI><A title=提交状况
href="http://acm.nuaa.edu.cn/acmhome/showstatus.do?contestId=23">提交状况</A>
</LI></UL></DIV></TD>
<TD width="20%">
<DIV id=header>
<UL class=menuList>
<LI><A title=实时排名
href="http://acm.nuaa.edu.cn/acmhome/contestRankList.do?&contestId=23">实时排名</A>
</LI></UL></DIV></TD>
<TD width="20%">
<DIV id=header>
<UL class=menuList>
<LI><A title=统计
href="http://acm.nuaa.edu.cn/acmhome/statistics.do?&contestId=23">统计</A>
</LI></UL></DIV></TD></TR></TBODY></TABLE>
<DIV id=content style="WIDTH: 97%">
<TABLE cellSpacing=0 cellPadding=1 border=0>
<TBODY>
<TR>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1099">
<DIV align=center><FONT size=4>A</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1097">
<DIV align=center><FONT size=4>B</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1094">
<DIV align=center><FONT size=4>C</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1100">
<DIV align=center><FONT size=4>D</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1098">
<DIV align=center><FONT size=4>E</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1051">
<DIV align=center><FONT size=4>F</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1055">
<DIV align=center><FONT size=4>G</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1056">
<DIV align=center><FONT size=4>H</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1057">
<DIV align=center><FONT size=4>I</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1004">
<DIV align=center><FONT size=4>J</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1023">
<DIV align=center><FONT size=4>K</FONT></DIV></A></TD>
<TD><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1024">
<DIV align=center><FONT size=4>L</FONT></DIV></A></TD></TR></TBODY></TABLE>
<DIV align=center>
<H2><STRONG>Tour de France</STRONG></H2>
<DIV align=center>时间限制(普通/Java):1000MS/3000MS
运行内存限制:65536KByte<BR>总提交:325
测试通过:176<BR>
<DIV align=left>
<P align=left><B class=MyB1>描述</B></P>
<P align=left><FONT face="Times New Roman" size=3>A racing bicycle is driven by
a chain connecting two sprockets. Sprockets are grouped into two clusters: the
front cluster (typically consisting of 2 or 3 sprockets) and the rear cluster
(typically consisting of between 5 and 10 sprockets). At any time the chain
connects one of the front sprockets to one of the rear sprockets. The drive
ratio -- the ratio of the angular velocity of the pedals to that of the wheels
-- is n:m where n is the number of teeth on the rear sprocket and m is the
number of teeth on the front sprocket. Two drive ratios
d<SUB>1</SUB><d<SUB>2</SUB> are adjacent if there is no other drive ratio
d<SUB>1</SUB><d<SUB>3</SUB><d<SUB>2</SUB>. The <I>spread</I> between a
pair of drive ratios d<SUB>1</SUB><d<SUB>2</SUB> is their quotient:
d<SUB>2</SUB>/d<SUB>1</SUB>. You are to compute the maximum spread between two
adjacent drive ratios achieved by a particular pair of front and rear clusters.
You may assume that no cluster has more than 10 sprockets and that no gear has
fewer than 10 or more than 100 teeth.
<P> </P></FONT>
<P></P>
<P align=left><B class=MyB1>输入</B></P>
<P align=left><FONT face="Times New Roman" size=3>
<P>Input consists of several test cases, followed by a line containing 0. Each
test case is specified by the following input:
<UL>
<LI>f: the number of sprockets in the front cluster;
<LI>r: the number of sprockets in the rear cluster;
<LI>f integers, each giving the number of teeth on one of the gears in the
front cluster;
<LI>r integers, each giving the number of teeth on one of the gears in the
rear cluster. </LI></UL></FONT>
<P></P>
<P align=left><B class=MyB1>输出</B></P>
<P align=left><FONT face="Times New Roman" size=3>
<P>For each test case, output the maximum spread rounded to two decimal places.
</P></FONT>
<P></P>
<P align=left><B class=MyB1>样例输入</B></P>
<P align=left><FONT
class=FONT1>2 4<BR>40 50<BR>12 14 16 19<BR>0<BR></FONT></P>
<P align=left><B class=MyB1>样例输出</B></P>
<P align=left><FONT class=FONT1>1.19<BR></FONT></P></DIV></DIV><BR></DIV>
<DIV align=center><FONT face="Times New Roman" size=4>[<A
href="http://acm.nuaa.edu.cn/acmhome/tosubmit.do?problemId=1097">提交</A>] [<A
href="http://acm.nuaa.edu.cn/acmhome/topicListAction.do?method=topicList&parentId=1097">讨论版</A>]
</FONT></DIV><BR>
<DIV align=center>|<IMG src="Tour de France.files/back_to.gif"><A
href="javascript:history.back()">返回</A> | | <IMG
src="Tour de France.files/top.gif"><A
href="http://acm.nuaa.edu.cn/acmhome/problemdetail.do?&method=showdetail&id=1097#top">转到页头</A>|
</DIV></DIV>
<DIV align=center>Current Administrators: XiangShuo <A
href="http://acm.nuaa.edu.cn/acmhome/mail.do?method=toPost&toUser=Narashy">Contact
administrators</A></DIV>
<DIV align=center><FONT size=2>Designed & Developed by <A
href="mailto:tomlytomly@163.com">Li Weitong</A>. Copyright © 2006-2007 NUAA
ACM Team,NUAA Computer Competition & Practice Association</FONT></DIV>
<DIV align=center><FONT size=2>All Rights Reserved.</FONT></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -