I was initially a bit stuck with this problem (A. Mr. Kitayuta, the Treasure Hunter), as I kept getting MLE with my approximately $$$9*10^8$$$ integer array, but there's nothing a little bit of memory collection couldn't fix, solving the problem through a method which the authors claimed to have prevented in the editorial :D. So I had quite a bit of a laugh whilst reading it. The last time I used short has got to be years ago.









