Time complexity of std::distance

Правка en1, от Ishan.nitj, 2016-07-05 22:07:03

I am trying to solve this problem http://mirror.codeforces.com/contest/652/problem/D. My approach is http://mirror.codeforces.com/contest/652/submission/18906153 which is nlogn and should pass the time constraint.However I am getting TLE. I think this might be due std::distance which i have used to calculate distance b/w 2 elements in set.Please HELP.

Теги education round 10, stl

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Ishan.nitj 2016-07-05 22:07:03 372 Initial revision (published)