SRM 257 from TC

grid_game.cc is not working. visit later.