USACO月赛(2011)1

合集下载

usaco 试题

usaco 试题

usaco 试题USACO试题USACO是美国计算机奥林匹克竞赛的缩写,它是美国学生在计算机科学领域的竞赛之一。

USACO试题涵盖了各种计算机算法和编程知识,并通过解题的方式来测试学生的能力。

本文将介绍USACO试题的背景、难度和一些解题技巧。

一、背景USACO试题由美国计算机奥林匹克竞赛委员会出题,并面向全球学生开放。

该竞赛旨在提高学生在计算机科学领域的技能,并培养他们的创造力和解决问题的能力。

USACO试题通常包括一系列编程问题,要求学生使用特定的编程语言来解决。

学生需要根据问题描述,并编写程序来产生正确的输出结果。

二、难度USACO试题的难度分为四个级别,分别是铜牌(Bronze),银牌(Silver),金牌(Gold)和白金牌(Platinum)。

每个级别的试题都有一定的难度,需要学生具备不同程度的编程和算法能力。

铜牌级别的试题相对较简单,通常涵盖了基本的算法和编程知识。

而白金牌级别的试题则非常复杂,需要学生具备深入的算法和数据结构知识,以及灵活运用编程语言的能力。

三、解题技巧解决USACO试题需要一定的技巧和方法。

以下是一些常用的解题技巧:1. 理解问题:首先,要仔细阅读问题描述,理解问题的要求和限制条件。

只有充分理解问题,才能更好地进行解题分析和编程设计。

2. 分析问题:其次,要对问题进行分析,找出问题的关键点和难点。

可以利用画图、列举样例等方式,深入剖析问题的本质,为后续的解题提供思路和方向。

3. 设计算法:在分析问题的基础上,需要设计合适的算法来解决问题。

根据问题的特点,选择合适的算法策略,如贪心算法、动态规划、搜索等。

同时,要考虑算法的时间复杂度和空间复杂度,尽量保证程序的效率。

4. 编写代码:根据设计的算法,编写相应的代码实现。

要注意代码的规范性和风格,使其易读易懂。

同时,遵循编程语言的语法和规范,确保程序的正确性。

5. 测试和调试:完成代码编写后,需要进行测试和调试,确保程序可以正确地运行。

usaco比赛规则

usaco比赛规则

usaco比赛规则(原创实用版)目录ACO 竞赛简介ACO 竞赛规则3.竞赛报名与参赛方式4.竞赛时间与地点5.竞赛奖项设置6.竞赛备考建议正文【USACO 竞赛简介】USACO(USA Computing Olympiad)是美国计算机奥林匹克竞赛的简称,是一项面向全球高中生的计算机编程竞赛。

该竞赛旨在选拔和培养优秀的计算机科学人才,激发学生对计算机编程的兴趣,提高学生的计算机编程能力。

【USACO 竞赛规则】USACO 竞赛规则分为在线赛和选拔赛两个阶段。

在线赛:在线赛分为月赛、季赛和年赛,每月一次。

参赛选手需要在规定时间内(通常为 4 小时)完成 3-5 道编程题目,每道题目有多个测试点,需要通过所有测试点才能获得满分。

参赛选手可以使用各种编程语言,如 C++、Java、Python 等。

选拔赛:选拔赛分为金级、银级和铜级比赛。

参赛选手需要通过在线赛的选拔,才有资格参加选拔赛。

选拔赛同样分为多个轮次,每个轮次需要完成 3-5 道编程题目。

选拔赛的难度相较于在线赛会有所提高。

【竞赛报名与参赛方式】参赛选手需要首先在 USACO 官方网站上注册账号,然后选择相应的比赛场次进行报名。

报名成功后,参赛选手可以在比赛当天通过官方网站登录系统参加比赛。

【竞赛时间与地点】USACO 竞赛的时间和地点因比赛级别和轮次而异。

在线赛通常在每月的某个周末进行,地点为个人电脑前;选拔赛则通常在各地的指定考场进行,具体时间和地点会在官方网站上公布。

【竞赛奖项设置】USACO 竞赛的奖项分为金、银、铜三个级别。

获得金级比赛奖项的选手将有机会参加更高级别的比赛,如全球信息学奥林匹克竞赛(IOI)。

此外,选拔赛中的成绩也将影响选手的晋级情况。

【竞赛备考建议】对于想要参加 USACO 竞赛的同学,可以提前学习编程语言和算法知识。

在比赛中,合理的时间分配和算法选择至关重要。

另外,多参加模拟赛和在线练习,提高自己的编程能力和应试技巧,也是取得好成绩的关键。

USACO试题精选(第一辑)

USACO试题精选(第一辑)

USACO试题精选第一辑第1题利润(Profits, USACO 2011 Jan) (3)第2题购买饲料二(Buying Feed II, USACO 2010 Jan) (4)第3题奶牛杂技(Cow Acrobats, USACO 2006 Nov) (5)第4题抓苹果(Apple Catching, USACO 2004 Nov) (6)第5题抢购干草(Hay For Sale, USACO 2008 Dec) (7)第6题建造栅栏(Building A Fence, USACO 2008 Oct) (8)第7题建造道路(Building Roads, USACO 2007 Dec) (9)第8题青铜莲花池(Bronze Lilypad Pond, USACO 2007 Feb) (10)第9题滑雪课程(Ski Lessons, USACO 2009 Open) (11)第10题奶牛飞盘队(Cow Frisbee Team, USACO 2009 Mar) (12)第11题奶牛博览会(Cow Exhibition, USACO 2003 Fall) (13)第12题最近回文(Cheapest Palindrome, USACO 2007 Open) (14)第13题安慰奶牛(Cheering up the Cows, USACO 2008 Nov) (15)第14题玉米迷宫(Corn Maze, USACO 2011 Open) (16)第15题奶牛集会(MooFest, USACO 2004 Open) (17)第16题奶牛文字(Cowlphabet, USACO 2011 Feb) (18)第17题奶牛跨栏(Cow Hurdles, USACO 2007 Nov) (19)第18题工作安排(Work Scheduling, USACO 2009 Open) (20)第19题手机网络(Cell Phone Network, USACO 2008 Jan) (21)第20题提交作业(Turning in Homework, USACO 2004 Open) (22)第21题滑雪缆车(Ski Lift, USACO 2006 Mar) (23)第22题派发巧克力(Chocolate Giving, USACO 2010 Feb) (24)第23题赞助学费(Financial Aid, USACO 2004 Mar) (25)第24题白银莲花池(Silver Lilypad Pond, USACO 2007 Feb) (26)第25题地震(Earthquake, USACO 2001 Open) (27)第26题股票市场(Stock Market, USACO 2009 Feb) (28)第27题奶牛赛车(Cow Cycling, USACO Feb 2002) (29)第28题奶牛观光(Sightseeing Cows, USACO 2007 Dec) (30)第29题道路重建(Rebuilding Roads, USACO Feb 2002) (31)第30题奶牛接力(Cow Relays, USACO 2007 Nov) (32)第31题猜数游戏(Haybale Guessing, USACO 2008 Jan) (33)第32题混乱奶牛(Mixed Up Cows, USACO 2008 Nov) (34)第33题修剪草坪(Mowing the Lawn, USACO 2011 Open) (35)第34题道路翻新(Revamping Trails, USACO 2009 Feb) (36)第35题安排牧场(Corn Fields, USACO 2006 Nov) (37)第36题叠积木(Cube Stacking, USACO 2004 Open) (38)第37题奶牛抗议(Generic Cow Protests, USACO 2011 Feb) (39)第38题洞穴奶牛第一话(Cave Cow 1, USACO 2004 Open) (40)第39题打扫食槽(Cleaning Up, USACO 2009 Mar) (41)第40题购买饲料(Buying Feed, USACO 2010 Nov) (42)第41题土地并购(Land Acquisition, USACO 2008 Mar) (43)第42题干草塔(Tower of Hay, USACO 2009 Open) (44)第43题明星奶牛(Popular Cows, USACO 2003 Fall) (45)第44题电子游戏(Video Game Troubles, USACO 2009 Dec) (46)第45题产奶比赛(Milk Team Select, USACO 2006 Mar) (47)第46题黄金莲花池(Lilypad Pond, USACO 2007 Feb) (48)第47题逢低吸纳(BUY LOW, BUY LOWER, USACO Feb 2002) (49)第48题焊接(Soldering, USACO 2011 Open) (50)第49题旅馆(Hotel, USACO 2008 Feb) (51)第50题道路和航线(Roads and Planes, USACO 2011 Jan) (52)这一辑从USACO月赛中选择了质量很高的50题,是用来训练算法设计和实现的极好素材,如果初学者希望掌握比较扎实的基本功,我建议将这一辑的题目好好研究一下。

usaco竞赛流程

usaco竞赛流程

USACO竞赛的流程大致如下:
1.在竞赛开放期间,选手需要进入竞赛页面参与比赛。

点击“Start the Contest!”键即
可开始比赛。

选手的比赛用时就会立即倒计时,且无法暂停。

2.进入题目页面后,选手可以点击标题查看相应题目并提交程序。

对于尚未提交的试题,
封面页会对应显示“Not submitted”。

对于已经提交的试题,封面页会对应显示“Submitted and Graded”。

3.选手需要按要求在自己的编程环境中完成题目,并提交cpp文件。

比赛会在时限过后自
动结束(如已经获得满分,则可以手动提前结束),只需在比赛结束前确保提交过已经完成的题目即可。

4.代码提交后,系统会自动给出评分,如果拿到了满分,系统会提示直接晋级。

如果没有
拿到满分,需要等待官方公布晋级分数线,每场月赛结束后一周内,官方会通过电子邮箱发放参赛选手的程序的评测结果。

成功晋级就可以在下一场月赛中参加更高级别的竞赛,没有成功晋级只能在下一场月赛中继续在原组别中打比赛。

2011年第一次月考

2011年第一次月考

东昌中学2010—2011学年第二学期第一次阶段性检测九年级历史试题时间:70分钟分值:100分命题人:王爱华一.选择题:(每小题1.5分,共60分。

将答案涂在答题卡上。

)1.据报道,安徽发现的繁昌人距今大约有180万年。

如果这一结论确凿的话,可以把中国已知最早人类的历史向前推进A.10万年 B.20万年 C.100万年 D.110万年2.黄河流域是中华文明的发祥地之一,最能体现该地区原始农耕文化成就的应该是A.种植粟 B.种植水稻 C.人工取火 D.住干栏式房子3.中国是世界四大文明古国之一,她的第一个王朝的建立者是A.秦始皇 B.齐桓公 C.启 D.禹4.2010年4月1日起,为期三个月的“国家宝藏——中国国家博物馆典藏珍宝展”在宁波博物馆举行。

其中右图的展品出自中国的A.商周时期 B.隋唐时期C.宋元时期 D.明清时期5.战国时期社会大变革的最主要表现是A.争霸战争频繁 B.铁器、牛耕使用 C.封建制度确立 D.诸子百家争鸣6.读右图,商鞅变法发生在何处?A.① B.②C.③ D.④、7.《论语》是大思想家孔子的语录,宋代宰相赵普有“半部论语治天下”之说。

孔子思想的核心主张是A.“仁”和“礼” B.“因材施教” C.“为政以德” D.“有教无类”8.《大汉天子》是近几年的一部热播电视剧,“大汉天子”为推进我国首次大一统格局做出了重要贡献。

在加强中央对地方的控制方面,他采取的最重要一项措施是A.设司隶校尉 B.实行“推恩令” C.北击匈奴 D.“罢黜百家,独尊儒术”9.汉朝时,派使臣出使大秦,他从长安出发,沿丝绸之路西行,先后要经过的地点是①今新疆境内②河西走廊③西亚④大秦A.①②③④ B.②①③④ C.①②④③ D.②①④③10.中华民族传统文化的瑰宝中医药,越来越受到世界各国的重视和欢迎。

下列人物中,对中国古代医学做出重大贡献的是A.张衡屈原 B.宋应星李时 C.蔡伦张仲景 D.张仲景李时珍11.下列史实,可以通过右图所示著作了解的有①秦始皇统一货币、文字②汉武帝在长安举办太学③宦官蔡伦改进造纸技术④李春设计并主持修建赵州A.①② B.②③ C.①③ D.②④12.电视剧《三国》的热播引起了人们对曹操的关注。

2011年美赛a题

2011年美赛a题

Team #9262Perfect Half-pipe: The Think ofSnowboard CourseAbstractWith the continuous progress and development, People are actively involved in sports and exploring in it continually. Skiing is popular with the majority of sports fans gradually under this condition. Especially,Snowboarding with good view, challenge and the basis of the masses develops rapidly and has become a major Olympic projects. In this paper, how to design and optimize the snowboard course of half pipe is discussed in detail. We strive to get the perfect course so that snowboarders can achieve the best motion state in the established physical conditions. What’s more, it may promote the development of the sport.This problem can be divided into three modules to discuss and solve. For the first problem of the design of half pipe, it can be based on the point of the energy conservation law. The method of functional analysis (Variation principle and Euler differential equation) is used to set up equations, when the secondary cause is ignored and the boundary conditions are taken into consideration. The curve equation is obtained by the above equation, that is, a skilled snowboarder can make the maximum production of “vertical air”.For the second question, athletes’ maximum twist in the air and some other factors need to be taken into account when to optimize the previous model, so that curve can meet the actual game conditions and appraisal requirements as much as possible. Ultimately, a satisfying curve will be got. The third problem is a problem relatively close contact with the actual, which is to setting down a series of tradeoffs that may be required to develop a “practical” course. In this paper, for the formulation of these factors, the main discussions are the thickness of snow on half pipe and the aspect of economy for the construction.After discussing these three aspects, the paper finally summarizes a construction program and evaluation criteria of the course in current conditions. Finally, by evaluating the advantages and disadvantages of the whole model,we put forward the advanced nature of the model, but also point out some limitations of the model.Key words: Snowboard course, Half-pipe,Functional, Euler equation, Fitted curve,Numerical differentiationTable of contentsTable of contents (1)I. Introduction (2)1.1 Half pipe structure (2)1.2 Background problem (3)1.3 Athletes aerials (3)1.4 A ssume (3)II. Models (5)2.1 problem one (5)2.2 P roblem two (11)2.3 Problem three (13)III. Conclusions (14)I V. Future Work (15)V. Model evaluation (15)5.1 Model Advantages (15)5.2 Model disadvantage s (16)VI. References (17)I. IntroductionSnowboarding is a popular pool game with the world of sports. The U-Snowboard’ length is generally 100-140m , U-type with a width of 14-18m,U-type Depth of 3-4.5m.the slope is 14°-18 °. In competition U-athletes Skate within the taxi ramp edge making the use of slide to do all sorts of spins and jumps action. The referees score according to the athletes’ performance as the Vertical air and the difficulty and effectiveness of action. The actions Consist mainly of the leaping grab the board, leaping catch of non-board , rotating leaping upside down and so on.1.1 Half pipe structureHalf pipe structure contains: steel body frame, slide board, steps to help slide and rails.1.2 Background problemIn order to improve the movement of the watch, it can be improved from two aspects: orbit and the athletes themselves. Now according to the problem the orbit can be designed as a curve. on the curve the athletes can get a maximum speed. The design of orbit includes a wide range of content, such as the shape of U-groove design, track gradient, width and length designed to help the design of sliding section, and so on. The rational design of half pipe can be achieved to transform the energy to efficiency power, make the athletes achieve the best performance in the initial state of the air. This paper discusses the rational design of half pipe to these issues.1.3 Athletes aerialsAthletes on the hillside covering with thick snow skill down with the inertia of the platform, jump into the air, and complete a variety of twists or somersault. Rating criteria: vacated, takeoff, height and distance accounted for 20%; body posture and the level of skill accounted for50%; landing 30%. According to the provisions the difficulty of movements are ranged into small, medium and large. The athletes option the actions. However, the ground must have a slope of about 37 ° and 60 cm above the soft snow layer.1.4 AssumeIn order to simplify the model and can come to a feasible solution,making the following assumptions:1• the shape of a snowboard course has a lowest point, the wide and the length of the snowboard course.2• air resistance can be negligible.3• it is assumed that the athletes themselve s have no influence.II. The Description of the ProblemThis problem is a typical engineering design, involving a lot of disciplines, such as advanced mathematics, engineering mathematics, mechanical dynamics and biological dynamics, as well as the relevant provisions of sports competition and judging standards, and so on. According to the requirement of the problem, determine the shape of a snowboard course to maximize the production of “vertical air” by a skilled snowboarder. For this problem, we can use the boundary conditions and site properties (e.g. symmetry) and other requirements to establish functional combining with the variation principle Euler equations. The original equation can be changed into a functional extremum problem.Secondly, we optimize the model boundary and determine the appropriate snowboard course’s slope toe to make the athletes perform maximum twist or do more difficult action.Finally a practical model should meet the requirements of safety, sustainability and economic. According to the high degree of humansecurity, the source of the snow and the topography the model will be optimized more reasonable.II. Models2.1 problem oneAs shown (3.1)A is the lowest point of the snowboard course.From A to B we want to find a curve to make the athletes get the maximum vertical distance above the edge of the snowboard course.Figure 1 Half-pipeSet A as origin of coordinate.Awing of conservation energy and neglecting air resistance, the mathematical function is,f A mgh mv W mv ++=+2202121 (1)Wherev 0 is the initial velocity (m/h ),v is the velocity towards destination (m/h ),m is the mass of an athlete (kg),w is the energy which is made by the athlete (J),h is the Vertical height (m),Af is the friction work (J ),According to mechanical analysis :rv m mg N 2cos =-θ (2)Where θ is the angle the angle between the tangent and the horizontal line, N is the pressure on the object,r is the radius of curvature,According to friction formula :⎪⎪⎭⎫ ⎝⎛+==r v m mg N f 2cos θμμ (3) To (3) into equation (1), combined with calculus :⎰⎪⎪⎭⎫ ⎝⎛+++=+s t dl r v m mg mgh mv W mv 02220cos 2121θμ (4) Friction acting A f :⎰⎰+=⎪⎪⎭⎫ ⎝⎛+=st st f dl r v m mgB dl r v m mg A 02022cos μμθμ (5)Use higher mathematics :()'''1232y y r += (6)dx y dl 2'1+= (7)According to the nature of the curve, the speed can be assumed to satisfy this expression :kx e v v 10= (8)Put all these formulas in order and suppose the expression for the functional :dx y e y mv dl r v m B kx s t ⎰⎰+==∏20222002'1''μμ (9) Set 2220'1''y e y mv F kx +=μ (10)Reference Euler equation :0'''22=⎪⎪⎭⎫ ⎝⎛∂∂+⎪⎪⎭⎫ ⎝⎛∂∂-∂∂y F dx d y F dx d y F (11) Obtained :0=∂∂yF (12)()232220'1''''y e y y mv y F kx +-=∂∂μ (13)()212220'1''y e mv y F kx +=∂∂μ (14) To (12)-(14)into equation (11),Obtained :()()⎪⎪⎪⎭⎫ ⎝⎛+=⎪⎪⎪⎭⎫⎝⎛+-21222022232220'1'1'''y e mv dx d y e y y mv dx d kx kx μμ(15) Integrate it :()()C y e mv dx d y e y y mv kx kx +⎪⎪⎪⎭⎫⎝⎛+=+-212220232220'1'1'''μμ(16) Simplified :()()()C y e y ymv y e mv k y e y y mv kx kx kx ++++=+252220232220232220'1'''3'12'1'''μμμ(17) ()'2''12''32y y y k y -+=(18) Suppose : ()y p dx dy=So : dy dpp dx dy dy dp dx y d =⋅=22Substituted into the above equation :()p p p k dy dp p 21232-+= (19)()kdy p dp p p212224=+- (20) Integrate it : ()⎰⎰=+-kdy p dp p p 212224 (21) Obtained the final results :02arctan 33313=+-+-c ky p p p (22) For the difficult equation, we obtain numerical solutions by numerical differentiation, and then obtained function equation by numerical fitting method :Discrete interval [0,8],Wheretake steps :h = 1.Each point xi, i = 0,1, …… 8.Every interval [x i , x i +1],the boundary conditions : y (0) = 0, y '(0) = 0.Into the formula (22) for the boundary conditions :C = 0Put h y y y i i -=+1' into formula (22):02arctan 33311131=-⎪⎭⎫ ⎝⎛-+⎪⎭⎫ ⎝⎛--⎪⎭⎫ ⎝⎛-+++i i i i i i i ky h y y h y y h y yNumerical Solution of each point is obtained in turn:x 0 1 2 3 4 5 6 7 8 y 0 0.0069 0.0094 0.0336 0.1329 0.3669 0.7872 1.4127 4.0382 Functions images and function equation are obtained by numericalfitting on Excel:Figure 2 The results of the numerical solution of the fitting imageAfter fitting the equation:y = 0.0003x6 - 0.0063x5 + 0.0435x4 - 0.1289x3 + 0.1594x2 - 0.0571x -0.0008 (23)Then the entire image can be got by symmetry along the y-axis. This models of problem one can be solved.2.2 Problem twoOn question 2, its main purpose is to improve the model in problemone under the condition of meeting the requirements of other possiblecases. Analyze other possible requirements which include a number ofaspects, such as the maximum twist in the air, players’ safety when they leave the ground and the stability of athletes when they land. Among them, we mainly consider the maximum twist of snowboarder in the air.When players leave the ground, they are only affected by gravity and air resistance. We ignore the players’ adjust ment in the air. After the project flying out of the ground, in order to analyzing simply and thinking clearly, the velocity of the object is divided into lines velocity and angular velocity. Velocity contains components of three different directions: horizontal, vertical and longitudinal. Angular velocity consists of somersault angular velocity and twist angular velocity.Figure 3 Flip velocity analysisAfter athletes flying out of the course, the velocity of longitudinal depends on a rational allocation of their own energy when they ski, so the design of course can not be considered. Vertical speed determines the maximum height with which athletes fly out of the course. So it is therequirement for design of the maximum “vertical air ”. For the horizontal velocity, players’ reaction force when they leave the course should be taken into account. And the horizontal velocity generated by reaction force must satisfy the equation below.x V V ≥' (24)Thus it can ensure that athletes fall back to ground safely after flying out, as the same time, it also meet appreciation, technical and safety requirements. On the problem that athletes reverse in the air, Conservation of energy can be used in the cross section.22222222112121212121212121y x af p y x mv mv w J w J A W m mv ++++=++(25)WhereV is the velocity of each state,Wf is the effective bio-energy an athlete release,J is the moment of inertia under different rotations,Aaf is the energy dissipated by air resistance.By checking the literature, moment of inertia J1 is 1.1(2m kg ⋅) and J2 is84.3(2m kg ⋅ ). Combining with the known data, we get the relationshipof w1, w2,y V . According to the value of V , the relationship of x V and y V will be got. The boundary angle is α.Fromtan∠α= y V/x V∠α=83.30So the boundary angle is 83.302.3 Problem threeIn practice, there are many factors to consider, for example, the thickness of snow covering and the construction of the economy, in addition to shape. The topography should be made the best use of to save project cost. Climate also is a constraint. Snow can be smoother and be used longer when the weather is cold.III. ConclusionsThe basis of this model is snowboarding skilled players can generate the maximum vertical air. Awing of numsolve and fitted the mathematical function is,y = 0.0003x6- 0.0063x5+ 0.0435x4- 0.1289x3+ 0.1594x2- 0.0571x -0.0008h=4(m) x0=8(m)∠α=83.30slope angle ∠θ= 180 (International recommended values)Figure 4 Half-pipeThe ultimate resolution of model takes various factors into account. The model can be applied to other similar improvements similar problems, such as the design of emergency chute.IV. Future WorkAlthough this paper considered a wide variety, but only one purpose getting the best track shape. However, in the actual construction process the aims to be achieved are complex and the design aspects are various. If you want to continue the track design, the following areas to be discussed,1. The run-up route’s height and inclination.2. Design of the best athletes’ running track. In the process you need to consider artistic, challenging and security.3. Design the length of the orbit to make athletes can efficiently complete the 5-8 vacated performances.V. Model evaluation5.1 Model Advantages(1). this model is infusion and the result is intuitive.(2). this paper has Strong theory with calculating the best shape theory.(3). This Problem is close to the real life situation, because of considered comprehensive.5.2 Model DisadvantagesSolving the model is complicated and some factors only have the qualitative analysis and not quantitative discussion.VI. References[1] Jason W. Harding , Kristine Toohey, David T. Martin1, Allan G. Hahn, Daniel A. James . 6/2008. TECHNOLOGY AND HALF-PIPE SNOWBOARD COMPETITION –INSIGHT FROM ELITE-LEVEL JUDGES. ISEA.[2] Wu Wei,Xia Xiujun. 2006. Half-pipe snow-board skiing skill training field in summer Explore and Design. China.[3]Xiao Ningning,Gao Jun.2009. Research of the Technical Characteristics of Half-pipe Snowboarding.China.[4] Building A Zaugg Half-Pipe.America. /resort/pipegroomers/pipe.shtml[5] Olympic Half Pipe Snowboarding ./way_5150384_olympic-half-pipe-snowboardi ng-rules.html[6]The Physics Of Snowboarding./physics-of-snowboard ing.html。

USACO 三月份试题

USACO 三月份试题

USACO 三月份试题简体中文版本By xzh************************************华丽的分割线*******************************青铜组问题************************************华丽的分割线*******************************四道题目,编号从11到14************************************华丽的分割线*******************************问题11:极品飞车贝西正在为一场即将到来的大奖赛准备她的赛车。

她希望购买一些部件来提高这辆赛车的性能。

他的赛车质量为M (1 <= M <= 1,000),加速度为(1 <= F <= 1,000,000)。

在赛车的配件店有N(1 <= N <= 20)个零件,编号分别为1到N。

只要他愿意,贝西可以买任意多个或者任意少个零件。

第P_i个零件增加加速度F_i (1 <= F_i <= 1,000,000),同时重量为M_i (1 <= M_i <= 1,000)。

根据牛顿第二定律,F=MA,F为加速度,M为质量,A为速度。

为了使她的赛车最大限度的发挥它的加速度的同时减少重量,她应该安装哪些组件?假设一辆赛车,他的初始加速度为1500,初始重量为100,有四种零件可以选择:i F_i M_i1 250 252 150 93 120 54 200 8如果只添加零件2,他的速度将是(1500+150)/(100+9) = 1650/109 = 15.13761。

下面是一个表格,表现了添加或不添加不同的零件后赛车的速度。

(0表示未添加,1表示已添加)部件总和总和1234 F M F/M0000 1500 100 15.00000001 1700 108 15.74070010 1620 105 15.42860011 1820 113 16.10620100 1650 109 15.13760101 1850 117 15.81200110 1770 114 15.52630111 1970 122 16.1475 <-- 最高的F/M1000 1750 125 14.00001001 1950 133 14.66171010 1870 130 14.38461011 2070 138 15.00001100 1900 134 14.17911101 2100 142 14.78871110 2020 139 14.53241111 2220 147 15.1020最终,最佳的方案是选择2,3和4号部件问题名称: boost输入格式:第一行:三个整数:F,M和N从第二行到第N+1行:第I+1行有两个整数:F_i和M_i样例输入:(文件boost.in):1500 100 4250 25150 9120 5200 8输出格式第一到P行:P个贝西应该给他的赛车增加的额外部件的编号,每个一行。

2011年高尔夫重大赛事

2011年高尔夫重大赛事
2011年高尔夫国内、国外重要赛事
编号
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
类型
欧巡赛 欧巡赛 美巡赛 国外 欧巡赛 美巡赛 欧巡赛 美巡赛 欧巡赛 美巡赛 欧巡赛 美巡赛 欧巡赛 美巡赛 欧、亚巡 美巡赛 美巡赛 美巡赛 美巡赛 欧巡赛 美巡赛
爱尔兰公开赛 绿蔷薇精英赛 WGC-普利司通邀请赛 旋石锦标赛 英格兰公开赛 美国PGA锦标赛 捷克公开赛 温丹锦标赛 尊尼获加锦标赛 巴克莱高球赛 欧米茄欧洲大师赛 德意志银行锦标赛 荷兰公开赛 宝马锦标赛 英国大师赛 维旺迪杯 法国Canal+公开赛 奥地利公开赛 巡回锦标赛 登喜路林克斯锦标赛 科隆韩国公开赛 新中国赛事 马德里大师赛 塞弗杯
4.07-4.10 大满贯、美、欧巡赛 欧巡赛 美巡赛 欧巡赛 美巡赛 4.14-4.17 4.15-4.18 4.21-4.24 4.22-4.25 4.28-5.01 4.29-5.02 5.05-5.08 5.05-5.08 5.06-5.09 5.07-5.10 5.12-5.15 5.13-5.16 5.12-5.15
10.13-10.16 10.13-10.16 10.20-10.23 10.27-10.30 11月 11月 11.03-11.06 11.10-11.13 11.17-11.20 11.24-11.27 12.01-12.04 12.08-12.11 12.08-12.11
葡萄牙大师赛 美的中国精英赛 卡斯特扬大师赛 安达卢西亚大师赛 澳大利亚公开赛 澳大利亚PGA锦标赛 WGC-汇丰冠军赛 新加坡公开赛 柔佛公开赛 欧米茄观澜湖世界杯 瑞银香港公开赛 迪拜世界高尔夫锦标赛 新同一亚洲锦标赛
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

"> >< <".
事实上,有些时候一大群牛会把这个舞会搞乱:"> >< < ><"(这个右边包括两对牛),复杂
的队伍安排必须完美合法:
> > > >< < >< < >< >< >< <
| | | -- | -- | -- -- -- |
| | ------ |
|
| -------------
|
--------------------------
--------- --------- -2 -3 6 --------- ----------
原三角形 左下角
顶部
右下角
倒三角
下图是一个最大价值的子三角形:
/\
/ 5/\
/-8/ 4\
/ 2/-3 6\
---------
子三角形中的平均数是:(4+6-3)/3=2.333...;忽略小数部分答案就是 2。
FJ(农民 john)注意到一些迷路的小母牛有时会混在队伍之中造成不平衡:
"> >< < <><".这是不被允许的。
FJ 记录下了最大 500 只牛的舞会队列并且希望知道这个队列是否平衡(即合法),他只记下
了每个奶牛的位置,并不确定牛与牛之间的配对。这样一个字符串是非法的: ">><<<><"。他希
32 5 -8 4 2 -3 6 样例输出 Sample Output: 2
贝茜希望战胜所有的同伴,所以她需要计算平衡括号字符串的得分情况。给定一个长度为 N (2<=N<=100,000)平衡括号字符串,帮助贝茜计算出它的得分情况。
输入格式 Input Format: 第 1 行,一个整数 N; 第 2 到第 N+1 行,每行一个整数,如果第 i+1 行的整数为 0,表示字符串第 i 个字符为“(”; 如果整数为 1,表示字符串第 i 个字符为“)”。 输出格式 Output Format: 一行,为字符串的得分情况。由于这个得分数可能很大,输出分数 mod 12345678910 后的余 数。 样例输入 Sample Input:
望你能写一个程序告诉他这个队列是否合法。
FJ 有 N(1<=N<=1,000)个问题,P_i(">")和 K_i("<")(1<=K_i<=200)长度可能不相同,如果合
法输出 "legal",否则输出"illegal"。
PROBLEM NAME: dance2
INPUT FORMAT:
* Line 1: A single integer: N
假设所有的字符串都是匹配的,字符串的得分形式如下:字符串“()”的得分为 1;如果子 串“A”的得分为 s(A),那么子串“(A)”的得分为 2*s(A);如果子串“A”和“B”的得分为 s(A) 与 s(B),那么子串“(AB)”的得分为 s(A)+s(B)。例如,s('(())()') = s('(())')+s('()') = 2*s('()')+1 = 2*1+1 = 3。
4 ><<>
OUTPUT FORMAT:
* Lines 1..N: Line i contains either the word "legal" or "illegal"
(without the quotes, of course) depending on whether the input
has a legal bowing configuration.
一个 N(1<=N<=700)行的三角网格。第 i 行网格的值为 Vij(-10^9<=Vij<=10^9),其中 j 的范
围是 1..i。Biblioteka 贝茜从三角网格中选择了一个长度大小最小是 K(1<=K<=20,1<=K<=N)的子三角形,子三角
形可以是原三角网格的子图形,也可能是原三角网格旋转或颠倒后三角网格的子图形。
* Lines 2..N+1: Line i contains an integer followed by a space and a
string of K characters '>' and '<': K_i and P_i
SAMPLE INPUT (file dance2.in):
2
6 >><<><
SAMPLE OUTPUT (file dance2.out):
legal
illegal
USACO 月赛试题解答(2011 年 2 月银奖组)
2
Problem 6: Cow Line [Lewin Gan, 2011] 奶牛排列(line)
【问题描述 Description】
N(1<=N<=20)头编号为 1..N 的奶牛,随意排列成一行,与农夫约翰玩一个疯狂的游戏。奶 牛们会按照自己的设想的次序排列成一行,并询问约翰这个排列次序的编号。作为回报,约翰能 给出一个排列次序编号,并要求奶牛们按这个次序排列。
/\
/5\
/-8 4\
/2 -3 6\
---------
她能选一下 5 个三角形中任意一个(每一个都是完全独立的三角形):
/\
/\
/\
/\
/\
/5 \
/5\
/ \5\
/5\
/ 5/\
/----\
/-8 4\ /-8 \4\ /-8 4\ /-8/ 4\ /\-8 4/\
/2 -3 6\ / 2 -3\6\ /-------\ / 2/-3 6\ / 2\-3/6 \
USACO 月赛试题解答(2011 年 2 月银奖组)
1
Problem 11: Cow Cotillion [Sherry Wu & Rob Kolstad, 2011]
奶牛的舞会每个春季都会举行,母牛(用符号">"表示)和公牛(用符号"<"表示)在舞会上
一起跳舞。一个可行的组合是:"><".有些时候也可能在另外一对牛中间:
在贝茜选择完子三角形之后,FJ 会得到一个他所选的所有数的平均数,舍弃小数部分,并按
照最后得数给予她相同数目的钱(或者从她那儿拿钱,如果得数是负数的话),贝茜想得到最大
的收益(或者最小损失)。帮他解决这个问题。
举一个例子,给定贝茜一个 N=3 的三角网格,必须选一个最小为 K=2 的三角形
下图描述了这个三角网格:
USACO 月赛试题解答(2011 年 2 月银奖组)
3
如果输入的第 2*i 行为“P”,第 i 行的答案为 N 个用空格隔开的整数,为输入数据第 2*i+1 行的奶牛排列次序。
样例输入 Sample Input: 52 P 3 Q 12534
样例输出 Sample Output: 12435 5
帮助贝茜计算出她能获得的最大收益。
TIME LIMIT: 2 seconds
INPUT FORMAT:
USACO 月赛试题解答(2011 年 2 月银奖组)
6
输入格式 Input Format: 第一行:两个用空格隔开的数 N,K 第 2..N+1 行:第 i+1 行有 i 个用空格隔开的数 Vij 输出格式 Output Format: 一行,最大收益或最小损失。 样例输入 Sample Input:
USACO 月赛试题解答(2011 年 2 月银奖组)
4
Problem 7: Best Parenthesis [Jeffrey Wang, 2009] 最佳括号(paren)
【问题描述 Description】
最近,奶牛们进行了一场有关平衡括号字符串的竞赛,通过竞赛,选拔出谁的平衡括号字符 串是最佳的。
6 0 0 1 1 0 1 样例输出 Sample Output: 3
USACO 月赛试题解答(2011 年 2 月银奖组)
5
Problem 8: The Triangle [Lewin Gan, 2011] 三角形(tri)
【问题描述 Description】
鉴于前一个月贝茜可观的产奶量,农夫约翰决定奖励贝茜一个奖品——一个问题。他给了她
排列的次序编号是按全部排列的字典升序给定的。 分析下面的例子: 农夫约翰有 5 头奶牛,给出它们的排列编号为 3. 奶牛排列的次序按字典的升序进行: 1st: 1 2 3 4 5 2nd: 1 2 3 5 4 3rd: 1 2 4 3 5 因此,奶牛们将按 1 2 4 3 5 的次序排列成一行。 然后,奶牛们按自己设想排列成一行,如“1 2 5 3 4”,反问约翰排列的次序编号是多少? 继续上述排列表: 4th : 1 2 4 5 3 5th : 1 2 5 3 4 约翰能看出并回答排列次序编号是 5。 农夫约翰和奶牛都需要你的帮助来完成游戏。他们共有 K(1<=K<=10,000)个问题,每个问 题有两个部分组成:命令部分分别为“P”或“Q”,以及一组数字。 如果命令部分为“P”,它的下一行为一个整数 Ai(1<=Ai<=N!),这个命令是约翰要求奶牛按 照编号 Ai 排列成一行。 如果命令部分为“Q”,它的下一行为 N 个不同的整数 Bij(1<=Bij<=N),这个命令由奶牛们 排列成一行,要求约翰指出这个排列的次序编号。 输入格式 Input Format: 第 1 行,两个用空格隔开的整数 N 和 K。 第 2*..2*K+1 行,第 2*i 行和第 2*i+1 行描述一个问题: 第 2*i 行仅有一个字母:字母“Q”代表奶牛问约翰它们排列次序的编号;字母“P”表示约 翰给出一个排列次序的编号,要求奶牛照此排列。 如果第 2*i 行为“Q”时,第 2*i+1 行将有 N 个用空格隔开的整数 Bij,描述奶牛的排列方式; 如果第 2*i 行为“P”时,第 2*i+1 行包含一个整数 Ai,为奶牛排列次序的编号。 输出格式 Output Format: 共有 K 行:第 i 行的内容为对问题 i 的回答。 如果输入的第 2*i 行为“Q”,第 i 行的答案为一个整数,为输入数据第 2*i+1 行奶牛排列次 序的编号。
相关文档
最新文档