bully....maguire's blog

By bully....maguire, history, 4 years ago, In English

In the problem tag it is mentioned that it can be solved using binary search.How to solve it using binary search ? https://codeforces.com/contest/1283/problem/D

| Write comment?
»
4 years ago, # |
Rev. 2   Vote: I like it +17 Vote: I do not like it

Please don't down vote .Don't make me sad during new year time .... If you give answer you are santa for me.

»
4 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

See: https://codeforces.com/blog/entry/72592

It shows a simpler(?) solution than binary search

Edit: Not sure how you would use binary search

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Also, don't use unordered_map or unordered_set because you will get TLE on test 6. Use map or set instead.