|
|
Nice one about max-flow :) solvable at O(N*log(N)) by greedy propagation of most backward vertex using any of still unused elevators (did it using the farthest one, but it doesn't matter) Edited by author 01.07.2026 22:02 Hi! I believe test #3 is invalid - there is no way to get from floor 1 to floor N. Can you please check? Thank you! Test is valid, but a bit unusual :) Try the boundary cases |
|
|