CantLoseNow's blog

By CantLoseNow, history, 3 years ago, In English

so i was solving a cses question and i had a confusion...why dont we sort a set or multiset before applying lower bound and upper bound? i saw some solutions and they just simply added the elements and directly applied lower bound and upper bound.

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

| Write comment?
»
3 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

It's because they are sorted data structures. You might want to read the references for these containers on Cppreference.