UVA.10189: Minesweeper. Finally accepted. The problem as pointed out by Raghav appeared to be the presence of a newline in the end. Pretty lame i think!!