Sunday, September 28, 2014

ACM 1197. Lonesome Knight / Один в поле воин

 We need to input the coordinates in the chess format and turn it to number and then check for every coordinate the knight can strike.
This is the list of all the corresponding coordinates needed to add to the current coordinate to get to a cell which a knight can strike.
  1, 1, 2, 2,-1,-1,-2,-2
  2,-2, 1,-1, 2,-2, 1,-1

       FULL SOURCE CODE

No comments:

Post a Comment