moaz123's blog

By moaz123, history, 9 years ago, In English

Hey everyone, how are you?

I am getting Time limit in this problem with a complexity of O(n log n) n<=10^5. I tried to see if something is overlapping, but couldn't find any. Thanks everyone.

And sorry for my bad English.

submission link: http://mirror.codeforces.com/contest/675/submission/18651358. Organized code Link: https://codeshare.io/leZMR

  • Vote: I like it
  • -6
  • Vote: I do not like it

| Write comment?
»
9 years ago, # |
  Vote: I like it +3 Vote: I do not like it
lower_bound(data.begin(),data.end(),a)

is O(N) for std :: set, use

data.lower_bound(a)

and you will get WA 6.