当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。
3 6 2 100 1 3 10 20 30 40 3 2 32 35 95 95 1 1 1 1 7 8 1 3 8 8 9 9 2 2 98 98 99 99 1 2 0 0 99 101
32
The most pessimistic case for the optimal travel plan for the above example is as follows:
Time Action
0…1 Wait in town 1
1…7 Take the bus line 3 from town 1 to town 1
7…8 Wait in town 1
8…9 Take the bus line 4 from town 1 to town 3
9…35 Wait in town 3
35…95 Take the bus line 2 from town 3 to town 2
95…98 Wait in town 2
98…99 Take the bus line 5 from town 2 to town 2
99…100 Wait in town 2
Total waiting time: 1+1+26+3+1=32
| 时间上限 | 内存上限 |
| 5000 MS | 64 MB |