+ 5
[CHALLENGE]Rain water drainage
For N number of buildings with some height input should look like: line 1-->5 (number of buildings) line 2-->1 2 1 1 4 (height of each building) I tried to picture the problem - | | - | | - | | - - | | | | | | | | | | | | ------------------------------- You see, the water will catch on top of buildings 3 and 4 which gives 2 units of water Main problem: finding the biggest water groupation
4 Respuestas
+ 14
submit it as an assignment in lesson factory
//and do you mean that water will catch on buildings between larger buildings
+ 4
agreed with @Gaurav
https://www.sololearn.com/discuss/1082512/?ref=app
+ 1
Oh, I will do it, thanks for the heads up