Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

bully....maguire's blog

By bully....maguire, history, 7 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.me/contest/1283/problem/D

| Write comment?
»
7 years ago, hide # |
← 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.

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

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

It shows a simpler(?) solution than binary search

Edit: Not sure how you would use binary search

»
7 years ago, hide # |
 
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.