Google APAC Round E : Problem 2

Revision en1, by loboelita, 2016-01-31 21:29:00

Hi,

I have been trying to solve this problem https://code.google.com/codejam/contest/8264486/dashboard#s=p1. I implemented an N^2logn solution[1]. However my solution didn't pass for the large test cases. It took much longer time than expected. I tried searching for some loops but couldn't find any. Can someone please check my code and tell me where is it going wrong? [1] https://ideone.com/mk6Qya

Thanks in advance.

Tags google apac, binary search

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English loboelita 2016-01-31 21:29:00 457 Initial revision (published)