Output the minimum number of lifts needed.
9 3 1 1 1 2 2 2 1 1 1 1 2 1 2 3 2 1 2 1 1 1 1 2 2 2 1 1 1
3
Constraints: 1≤W,L≤5001 \le W, L \le 5001≤W,L≤500, 0≤H≤99990 \le H \le 99990≤H≤9999.
Translated by ChatGPT 5
注册一个 云斗学院 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 云斗学院 通用账户