Knight game(Contest)
Knight game easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Knight game easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Problem Statement :
You are given a 100*100 chessboard. A knight is placed on cell (i, j). You have to find the number of blocks on the chessboard that the knight can be at in exactly N moves. Input Input contains three integers i j N.
Constraints
1 <= i, j <= 100 1 <= N <= 10 Output Output a single integer, the number of blocks on the chessboard that the knight can be at in exactly N moves. Example sample input 1 1 1 1
sample output 1 2
sample input 2 50 50 1
sample input 2 8
link: