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

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

A

Idea:imranakki, wuhudsm

solution
code(C++)
Rate the Problem

B

Idea:Davy_D._Kaosar

solution
code(C++)
Rate the Problem

C

Idea:ProofByContradiction_

solution
code(C++)
Rate the Problem

D

Idea:wuhudsm

solution
code
Rate the Problem

E1+E2

Idea:xksark (easy version), wuhudsm (hard version)

solution (easy version)
solution (hard version)
code(easy version)
code(hard version)
Rate the Problem

F

Idea:wuhudsm

solution
code(C++)
Rate the Problem
  • Проголосовать: нравится
  • +19
  • Проголосовать: не нравится

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

Auto comment: topic has been updated by wuhudsm (previous revision, new revision, compare).

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

organizers are sigma. Thank you for contest

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

Generally, doing an operation in $$$[L,R]$$$ is to set $$$b[L]:= a value in [b[R+1],b[R]]$$$, then left shift $$$b[L...R]$$$.

Consider different $$$R$$$ (including $$$+∞$$$), the value range of $$$b[L]$$$ is $$$[0,b[L]−1]$$$, this corresponds to "taking any number $$$( \gt 0)$$$ of stones from the pile of stones in $$$b[L]$$$".

I didn't fully understand. Can you clarify why we are considered to be $$$b[L]$$$ not $$$b[R]$$$?

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

    Note that we are first setting a value in position of $$$b[L]$$$ and then left-shifting (cyclic!) the subarray $$$b[L, R]$$$ (not the other way round). Hence if we first set a value $$$b[L]$$$ to some value $$$x \in [b[R + 1], b[R]]$$$, then upon left shifting this subarray we get the following change

    $$$b[L, L + 1\ldots R - 1, R] \rightarrow b[L+1, L + 2 \ldots R, x]$$$

    which is what we wanted i.e. changing the $R$-th index to $$$x$$$.

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

    Assuming a player chooses the interval $$$[L, R]$$$ and reduces $$$x$$$ numbers by $$$1$$$. Observe the corresponding changes in the $$$b$$$ array, which corresponds to reducing $$$b[a[L]]$$$ by $$$x$$$ and reordering the array $$$b$$$.