Comments
+2

As heights are less than or equal to 100 in the worst case (1,1,1..100) after throwing around 10000 stones all remaining stones will fall into waste system. So if k is greater than 10^4 answer is no else just brute force.

Did anyone fail in Test Case 52 in problem C? Can someone explain me why am i failing this testcase

Can you explain how to solve A.