반응형
[codeforces] Tram
알고리즘(Python,Java)2019. 11. 27. 17:17[codeforces] Tram

A. Tram Linear Kingdom has exactly one tram line. It has n stops, numbered from 1 to n in the order of tram's movement. At the i-th stop ai passengers exit the tram, while bi passengers enter it. The tram is empty before it arrives at the first stop. Also, when the tram arrives at the last stop, all passengers exit so that it becomes empty. Your task is to calculate the tram's minimum capacity s..

반응형
image