Moderator: Board moderators
Kuba12 wrote:Hi, I keep getting WA for this problem and I think that my program isn't reading the input well. I tried four different methods to do that (some of them got SIGSEGV (?)) but the program isn't working. Any tips on reading the problem's data in C/C++?
abishek wrote:I dont understand what you mean by shortest path.
In short, the term that I would use for this program in Breadth First Search.
Of course it is the same as the shortest path problem with all the weights in the graph as 1.
But then the order is 0(n).
Adrian Kuegel wrote:There are at most 1000 intermediate holes, but starting hole and target hole doesn't count. So you need to increase your array size from 1000 to 1002 and you will get Accepted
There are not more than 1000 gopher holes ...
Please, what's wrong with this code? Can it be precision errors?
Users browsing this forum: No registered users and 1 guest