TLE

Revision en1, by toTalmeSS, 2016-10-26 22:38:42

Hello guys... Here's my code for the first problem of the Canada Cup. Unfortunately, I got TLE on test case 4. I was really excited after preparing the solution as I've never been able to solve a single problem within the contest time. Is there anyway to optimize my code? Or do I have to change the approach altogether? Thanks in advance and happy coding to all! Problem link My code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English toTalmeSS 2016-10-26 22:38:42 473 Initial revision (published)