I have written the following code but am getting a TLE.Could someone please tell me how to decrease the time complexity.Thanks in advance.
Following is the link of the code : http://ideone.com/xtRtMI
I have written the following code but am getting a TLE.Could someone please tell me how to decrease the time complexity.Thanks in advance.
Following is the link of the code : http://ideone.com/xtRtMI