正在加载图片...
Sample Outpu 230 105 0135791113152099 4131519202530 IMPOSSIBLE 05101214202530 246810121422252829 1050100 0103040 02030 02050 0246810 Explanation of examples In the first example, take elevator I to floor 13(130 seconds), wait 60 seconds to switch to elevator 2 and ride it to floor 30(85 seconds) for a total of 275 seconds In the second example, take elevator I to floor 10, switch to elevator 2 and ride it until floor 25 There, switch back to elevator I and get off at the 30'th floor. The total time is 10*10+60+15*1+60+5*10=285 seconds In example 3, take elevator 1 to floor 30, then elevator 2 to floor 20 and then elevator 3 to floor In the last example, the one elevator does not stop at floor I Problemsetter: Igor Naverniouk Alternate solutions: Stefan Pochmann frank pok man chu3 Sample Input Sample Output 2 30 10 5 0 1 3 5 7 9 11 13 15 20 99 4 13 15 19 20 25 30 2 30 10 1 0 5 10 12 14 20 25 30 2 4 6 8 10 12 14 22 25 28 29 3 50 10 50 100 0 10 30 40 0 20 30 0 20 50 1 1 2 0 2 4 6 8 10 275 285 3920 IMPOSSIBLE Explanation of examples In the first example, take elevator 1 to floor 13 (130 seconds), wait 60 seconds to switch to elevator 2 and ride it to floor 30 (85 seconds) for a total of 275 seconds. In the second example, take elevator 1 to floor 10, switch to elevator 2 and ride it until floor 25. There, switch back to elevator 1 and get off at the 30'th floor. The total time is 10*10 + 60 + 15*1 + 60 + 5*10 = 285 seconds. In example 3, take elevator 1 to floor 30, then elevator 2 to floor 20 and then elevator 3 to floor 50. In the last example, the one elevator does not stop at floor 1. Problemsetter: Igor Naverniouk Alternate solutions: Stefan Pochmann, Frank Pok Man Chu
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有