Hello,
I don't have access to other's solutions in gym contests yet. I was trying to solve this question using DP but was unable to reduce complexity to fit within the time-bound.
I will appreciate any help.
Hello,
I don't have access to other's solutions in gym contests yet. I was trying to solve this question using DP but was unable to reduce complexity to fit within the time-bound.
I will appreciate any help.
The height of the pyramid is $$$O(\sqrt N).$$$