I was solving Labyrinth from cses. My submission was Submission, I got a wrong answer on this submssion, but I think this solution works. Please Tell me what is wrong in my solution.
I was solving Labyrinth from cses. My submission was Submission, I got a wrong answer on this submssion, but I think this solution works. Please Tell me what is wrong in my solution.
After two years I finally reached pupil on Codeforces.
I use Visual Studio Code with CPH and Thorium browser. I am just curious about what tools do you use to do competitive programming.
In the problem Swaps [problem:https://codeforces.com/problemset/problem/1573/B], my solution which is of O(n log n) time complexity is not working and giving a tle on test 2, when clearly the problem allows O(n log n) to pass. My solution: [submission:https://codeforces.com/contest/1573/submission/240104987]. Can somebody explain why this is happening. I know that there is a better solution in the editorial but why should this not pass?
Update: Fixed the problem :>