JAVA..TLE..Please help!!

Revision en1, by OneClickAC, 2017-01-18 15:30:37

Hi , I am a beginner programmer and i need some help . Basically i was working on a problem on codeforces (Problem Link-> java) and i am getting TLE verdict. I am not able to understand why i am getting so as I am using map for insertion and retrieval of values which is a form of red black tree and takes logarithmic time . My code is exceeding limit on test 20 .. Submission link->

Please help me in understanding the reason behind this and if possible , also tell about how to overcome this problem of Time Limit..

Code Link->


  Rev. Lang. By When Δ Comment
en1 English OneClickAC 2017-01-18 15:30:37 695 Initial revision (published)