标签:
Time Limit: 1000 MS Memory Limit: 32768 KB
64-bit integer IO format: %I64d , %I64u Java class name: Main
3 123 321 3 123 312
Yes. in in in out out out FINISH No. FINISH
For the first Sample Input, we let train 1 get in, then train 2 and train 3. So now train 3 is at the top of the railway, so train 3 can leave first, then train 2 and train 1. In the second Sample input, we should let train 3 leave first, so we have to let train 1 get in, then train 2 and train 3. Now we can let train 3 leave. But after that we can‘t let train 1 leave before train 2, because train 2 is at the top of the railway at the moment. So we output "No.".
标签:
原文地址:http://www.cnblogs.com/yangxingzhe8102/p/5939258.html