Problem link : https://mirror.codeforces.com/problemset/problem/448/D
The editorials says that the max height is independent of the colors of the block and can be calculated directly through the total number of blocks.
I am not able to prove it. I need mathemetical/analytical proof of this.
Can anyone help please?