Dissatisfying Lift
Time Limit: 1000MS | Memory Limit: 10000K | |
Total Submissions: 5102 | Accepted: 1123 |
Description
There's a building with M floors. The amounts of tenants of every floor are K1, K2, K3, ..., Km. One day all the tenants went home together and they took the same lift (suppose the lift was large enough). Because of some reason the lift could only stop on one floor and the tenants must go upstairs or downstair