Search found 1 match

by Musaffa
Tue Nov 10, 2009 5:45 pm
Forum: Volume 108 (10800-10899)
Topic: 10801 - Lift Hopping
Replies: 56
Views: 37457

Re: 10801 - Lift Hopping

U can think of using unsigned int to track the time.
A lift can be as slow as 100. Max lift no 5 & Max floor no 100.
So 100*100*5=50000<65535 but >32767.
Use Dijkstra's shortest path.
Here is a sample input.

Code: Select all

4 89
7 2 4 8
3 34 45 56 77
4 23 34 89
0 99
3 99
Output

Code: Select all

1671

Go to advanced search