Getting json into a java object from a web service is something that needs to be done all the time. This code makes it a little easier.
Rocks are falling from the sky! You get an
arrayof columns: rocks
Simulate rocks’ flight until they hit a platform, another rock or the bottom. Platforms stay put.
mapis an array in the format
maptranslates to the rock at
x: 2, y: 5
returnthe result after all rocks have stopped moving.
After going back and forth over this code for it seems like an eternity (about an hour) I finally got an accepted solution. The problem turned out to be a small typo.
Here it is, my solution to http://www.spoj.pl/problems/HASHIT/ in C#.