Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Truba's blog

By Truba, history, 8 years ago, In English

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.

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