I was coding problem 384D - Volcanoes after reading the editorial.
I keep getting wrong answer. I traced the code and tried all the small tests in the test cases but still can't find the bug.
The test case I fail in is large so I can't get a hold of it
Help is really appreciated. Here is my code:
[Edit]: I found the bug, thanks :)