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

Автор Aveiro_quanyue, история, 16 месяцев назад, По-английски

Problem: https://atcoder.jp/contests/arc156/tasks/arc156_d

My note:

Google drive: https://drive.google.com/file/d/1It475dOHDzrt0DCm0so95x4y7ocn51pT/view?usp=share_link

Tencent: https://docs.qq.com/pdf/DU3pOalBZbW9DbVV1

Code (C/C++ are both OK, please use gcc/g++ compilers), in $$$O(NlogKmax(A))$$$ time:

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

»
16 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Thanks a ton, Aveiro_quanyue.

»
16 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

can u please make a notes on problem B ?

  • »
    »
    16 месяцев назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    Yes, you can enumerate the possible mex after operations. For example, if the initial sequence is $$$0, 1, 3$$$ and the final mex is $$$4$$$, then you can only add $$$0, 1, 2, 3$$$, and adding $$$2$$$ is mandatory. So it is boiled down to calculate the number of solutions to some undetermined equations.

»
16 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

is this what all Chinese Pupils are capable of...