Pro.ID10232 TitleStrategies Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10232 AC0 Submit0 Ratio- 时间&空间限制描述Bill, Steve and Linus participate in programming contests just like the one you're competing in right now. They have different strategies and we’d like to find out whose strategy is the best. 输入The first line contains the number of scenarios. Each scenario describes one contest and its first line tells you how long the contest lasts (in minutes, from 30 to 1440) and the number of problems (from 3 to 24). In a second line you'll get the difficulties of the problems, as explained above they tell you how many minutes (from 1 to 600) the guys need in order to solve the problems. 输出Description Bill, Steve and Linus participate in programming contests just like the one you're competing in right now. They have different strategies and we’d like to find out whose strategy is the best. Input The first line contains the number of scenarios. Each scenario describes one contest and its first line tells you how long the contest lasts (in minutes, from 30 to 1440) and the number of problems (from 3 to 24). In a second line you'll get the difficulties of the problems, as explained above they tell you how many minutes (from 1 to 600) the guys need in order to solve the problems. Output The output for every scenario begins with a line containing "Scenario #i:", where i is the number of the scenario starting at 1. Then print a single line telling who wins, the number of problems he solves and his score. Use the exact format as shown below in the sample output, even if the winner only solves 0 or 1 problems. Terminate the output for the scenario with a blank line. Sample Input 2
180 6
23 42 170 33 7 19
60 2
43 17 Sample Output Scenario #1:
Steve wins with 5 solved problems and a score of 288.
Scenario #2:
Steve wins with 2 solved problems and a score of 77. Source 样例输入2
180 6
23 42 170 33 7 19
60 2
43 17 样例输出Scenario #1:
Steve wins with 5 solved problems and a score of 288.
Scenario #2:
Steve wins with 2 solved problems and a score of 77. 作者 |