CodeForces - 294A Shaass and Oskols
Posted Styx-ferryman
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CodeForces - 294A Shaass and Oskols相关的知识,希望对你有一定的参考价值。
Shaass has decided to hunt some birds. There are n horizontal electricity wires aligned parallel to each other. Wires are numbered 1 to n from top to bottom. On each wire there are some oskols sitting next to each other. Oskol is the name of a delicious kind of birds in Shaass‘s territory. Supposed there are ai oskols sitting on the i-th wire.
Sometimes Shaass shots one of the birds and the bird dies (suppose that this bird sat at the i-th wire). Consequently all the birds on the i-th wire to the left of the dead bird get scared and jump up on the wire number i?-?1, if there exists no upper wire they fly away. Also all the birds to the right of the dead bird jump down on wire number i?+?1, if there exists no such wire they fly away.
Shaass has shot m birds. You‘re given the initial number of birds on each wire, tell him how many birds are sitting on each wire after the shots.
以上是关于CodeForces - 294A Shaass and Oskols的主要内容,如果未能解决你的问题,请参考以下文章
#Shaass and Lights:CodeForces - 294C