HBC13891The Trip On Abandoned Railway题解

不可一世的小女人 算法基础篇 55 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
There are many ghosts at the abandoned station on unknown railway. We mark the abandoned stations as 1,2..n according to the order. There are ai ghosts at the ith station.Yakumo Yukari often opens a black hole and makes a train appearing at a certain station. For example, the train appears at the x station, and k ghosts get off at the station. Then there would be k+d ghosts at the x+1 station to get off,k+2×d at x+2 station and so on....There would be k+yd ghosts at the x+y station to get off . In others words, the numbers getting off at x,x+1,x+2..n station form a tolerance of d arithmetic progression.Onozuka Komachi would comes a certain station to take away the ghosts.You have the records of trains appearing and Komachi coming. You should tell Komachi how much ghosts at a certain station when she come to there.

There are many ghosts at the abandoned station on unknown railway. We mark the abandoned stations as 1,2..n according to the order. There are ai ghosts at the ith station.Yakumo Yukari often opens a black hole and makes a train appearing at a certain station. For example, the train appears at the x station, and k ghosts get off at the station. Then there would be k+d ghosts at the x+1 station to get off,k+2×d at x+2 station and so on....There would be k+y∗d ghosts at the x+y station to get off (0≤y,x+y≤n). In others words, the numbers getting off at x,x+1,x+2..n station form a tolerance of d arithmetic progression.(you can consider ghosts getting off at the same time.)Onozuka Komachi would comes a certain station to take away the ghosts.(The number of ghosts at the station would become 0)You have the records of trains appearing and Komachi coming. You should tell Komachi how much ghosts at a certain station when she come to there.

HBC13891The Trip On Abandoned Railway题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC13891The Trip On Abandoned Railway题解