|
|
back to boardI'm using Warshall's algorithm, but TLE 21 Why? What is a key point of this task? Re: I'm using Warshall's algorithm, but TLE 21 You can try to condense your graph first. It helped me to avoid TLE21 with my O(N^3) DFS and indeed would help your Floyd-Warshall. However, I am not sure whether there is not a better solution — my time is 0.25s that is so far from the best 0.046s. Re: I'm using Warshall's algorithm, but TLE 21 Thx, I will try this way. |
|
|