Блог пользователя thehumbleguy

Автор thehumbleguy, 8 лет назад, По-английски

Looking for a solution to task C of the recent atcoder grand contest since the editorial given is only in Japanese. I tried converting it to english but it's a very bad conversion.

I cannot understand how you can verify in O(N) if its possible to satisfy the given condition by using at max X distinct characters. (the check(X) function used in Binary search)

  • Проголосовать: нравится
  • +24
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

You may watch Petr's screencast with commentary for hints:

AtCoder Grand Contest 029 screencast with commentary

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Sorry for the delay, we'll finish it within this week.

Inside the binary search, basically, we decide S1, S2, ... greedily. S1 should be the lexicographically minimum string of length A1. Then, S2 should be the lexicographically minimum string of length A2 that is greater than S1. But we need to do this efficiently.