During my routine practice of topcoder problems, I was troubled a lot by the
HourGlass Problem.
In the
editorial the author talked about a different approach in the last paragraph but failed to explain it.
Can somebody please explain me why the formula works??