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.