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

Автор rng_58, история, 7 лет назад, По-английски

ExaWizards 2019 will be held on Saturday (time). The writers are semiexp and camypaper.

Contest Announcement

Contest duration: 120 minutes

Rated range: <2800

The point values will be 100 — 200 — 500 — 600 — 700 — 1200.

Let's discuss problems after the contest.

(Note: we noticed that it overlaps with SRM, but this is a sponsored contest and at this moment it's difficult to move it. Sorry about that.)

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

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

Does a special name indicate something? Or is it just an ARC?

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

How to solve D?

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

How to solve C?

  • »
    »
    7 лет назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится +18 Проголосовать: не нравится

    Consider the operation backwards, maintain the positions that the golems would disappear, which is some prefix plus some suffix. Time complexity is $$$O(N+Q)$$$ since each upate takes $$$O(1)$$$ time.

  • »
    »
    7 лет назад, скрыть # ^ |
    Rev. 3  
    Проголосовать: нравится +16 Проголосовать: не нравится

    Observations:

    • If $$$i \lt j$$$ and $$$j$$$ is to fall off from left, then $$$i$$$ will also fall off from left.
    • If $$$i \lt j$$$ and $$$i$$$ is to fall off from right, then $$$j$$$ will too.

    So we can divide the sequence into 3 parts: $$$[1,L],[L+1,R-1],[R,N]$$$.

    • The left part will fall off from left.
    • The right part will fall off from right.
    • The middle part will remain.

    We can compute $$$L,~R$$$ using binary search.