I feel confused with this problem, too.
I don't know why I always get TLE.......
Since we need to enumerate all possible paths. Can we come up with a better solution than backtracking?
So many doyens tried to solve this problem, but in vain.
Is there anything wrong with input or output... ?
Search found 17 matches
- Fri May 24, 2002 4:35 am
- Forum: Volume 102 (10200-10299)
- Topic: 10239 - The Book-shelver's Problem
- Replies: 14
- Views: 5015
Well, though I used long int and got an AC for this problem, I still don't know what the trick is about using long int. I also found that I got many wrong answers for some problems due to precision error like problem 10236(The Fibonacci Primes). Can someone explain how to avoid floating point precis...