I am trying to solve 611D - New Year and Ancient Prophecy, I wrote 60357814 this solution. I think the Time Complexity of my solution is $$$O(n ^ 2\log{}n)$$$ but I am getting Time Limit Exceeded verdict. I want to know is my Time Complexity analysis is wrong because I saw many $$$O(n ^ 2\log{}n)$$$ solutions are accepted(like 15127310) but not mine.
Auto comment: topic has been updated by sourabh_jangid (previous revision, new revision, compare).