Language:
|
Wormholes
Time Limit: 2000MS | Memory Limit: 65536K | |
Total Submissions: 45773 | Accepted: 16905 |
Description
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE you entered the wormhole! Each of FJ's farms comprises N (1 ≤ N ≤ 500) fields conveniently numbered 1..N,M (1 ≤