XII NEERC Western Subregional Contest: Problem H
Hi There! I am stuck on this problem. Can you give me some hints?
My #code gives WA#2.
Trying to solve with dynamic programming and binary searching the answer. Thanks!
Upd: You can check the correctness Here.