You are viewing a single comment's thread. Return to all comments →
Hello! I decided to download a number of test cases to compare the expected output against that of my Python3 solution. The diff shows that both the expected output and my output are exactly the same. Yet, the test case marks 'Wrong Answer'. My solution is in Python 3. It uses a DFS to mark a dictionary of paths before processing the queries. It's O(N x N) + O(Q x N). I'm not getting any errors with timeout or any other errors for that matter. This only occurs when the test case has M=100000. As another user has already pointed out, there are currently no Python 3 solutions with more than ~36 points which is extremely unusual. If any of the moderators have time, could someone please look into why this might be the case. I can post my solution upon request.
Also, the description of the problem states that queries 1 and 2 should update all v where there is a path from u to v, but the examples demonstrate that u is to be updated as well. I don't believe that this is consistent with the definition of a path. Could the description be updated to explicitly require that a of u be updated as well?