loboelita's blog

By loboelita, history, 9 years ago, In English

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.

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Pass the vector to the functions by reference.