求解释Sicily 1046.Plane Spotting题目大意Craig is fond of planes.Making photographs of planes forms a major part of his daily life.Since he tries to stimulate his social life,and since it’s quite a drive from his home to the airport,Craig tri

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 06:33:47
求解释Sicily1046.PlaneSpotting题目大意Craigisfondofplanes.Makingphotographsofplanesformsamajorpartofhisdail

求解释Sicily 1046.Plane Spotting题目大意Craig is fond of planes.Making photographs of planes forms a major part of his daily life.Since he tries to stimulate his social life,and since it’s quite a drive from his home to the airport,Craig tri
求解释Sicily 1046.Plane Spotting题目大意
Craig is fond of planes.Making photographs of planes forms a major part of his daily life.Since he tries to stimulate his social life,and since it’s quite a drive from his home to the airport,Craig tries to be very efficient by investigating what the optimal times are for his plane spotting.Together with some friends he has collected statistics of the number of passing planes in consecutive periods of fifteen minutes (which for obvious reasons we shall call ‘quarters’).In order to plan his trips as efficiently as possible,he is interested in the average number of planes over a certain time period.This way he will get the best return for the time invested.Furthermore,in order to plan his trips with his other activities,he wants to have a list of possible time periods to choose from.These time periods must be ordered such that the most preferable time period is at the top,followed by the next preferable time period,etc.etc.The following rules define which is the order between time periods:
1.A period has to consist of at least a certain number of quarters,since Craig will not drive three hours to be there for just one measly quarter.
2.A period P1 is better than another period P2 if:
* the number of planes per quarter in P1 is higher than in P2;
* the numbers are equal but P1 is a longer period (more quarters);
* the numbers are equal and they are equally long,but period P1 ends earlier.
Now Craig is not a clever programmer,so he needs someone who will write the good stuff:that means you.So,given input consisting of the number of planes per quarter and the requested number of periods,you will calculate the requested list of optimal periods.If not enough time periods exist which meet requirement 1,you should give only the allowed time periods.
大意就好了...据说是水题,英语渣给跪了

求解释Sicily 1046.Plane Spotting题目大意Craig is fond of planes.Making photographs of planes forms a major part of his daily life.Since he tries to stimulate his social life,and since it’s quite a drive from his home to the airport,Craig tri
CRAIG喜欢飞机,他每天用大部分时间给飞机照相.由于他希望让自己的社交更充分,也由于他家离机场很远,他想尽办法挤进有限的时间来观察飞机.他和他的朋友们统计了15分钟(四分之一小时)内所有的航班.为了让他自己每次的统计更有效率,他只对一定时段内的平均航班数感兴趣.这样的话更节省时间.同时,为了平衡自己的业余生活,他需要从一系列的其他活动中选择最好观察飞机的时间.这些活动的时间被CRAIG列在一张表上,这些活动的顺序按照其重要性而排列着,具体排列这张表也不乏规则:



每次观测必须包含多个四分之一小时时段,因为Craig不能只为了一个四分之一小时时段而开3小时的车来观测


如果相比两个不同的观测活动,其中一个活动(P1)可以比另一个活动(P2) 更有成果,在一下的环境下会发生这种情况:

P1中每四分之一小时时段的平均飞机数比P2没四分之一小时时段要多

两者飞机数量相当,但P1的总时段比P2长(含有更多的四分之一小时时段)

两者飞机数量相当,所包含的四分之一小时时段也相同,但P1比P2更早结束



因为CRAIG不会编程,所以需要你来把这个程序写下来.那么,输入四分之一小时时段所观测到的飞机数和所有四分之一小时时段的数量,你可以算出最好的时段.如果时间不够的话,你只需要算出可行的时间段.
.
/>