HackerEarth Filling stones problem solution - TheCScience