KLUG1  COUNT JUMPS
Mr. Krish want to count number of positions KNIGHT can move in a chessboard of size nxm.He was too lazy in counting possible positions ,knight can move manually , so he need your help in finding possible positions.
Help Mr.Krish to find total possibile positions knight can move from current position.
Constraints:
1<=n,m<=100
1<=a<=n,1<=b<=m;
Input
First line contains n and m .where n is number of rows and m is number of columns of chessboard
next n lines contains 1’s and 0’s.
next line contains a ,b (current position of the knight)
Output
Print total number of possible positions knight can move
Note:
chess board filled with only 1’s and 0’s
1 means that position is filled i.e knight can't move to filled position.
0 means KNIGHT can move to that position (empty position)
1based indexing.
Example
Input: 4 4 1 0 1 0 0 1 1 1 1 1 0 1 0 1 1 1 3 3 Output:
4
hide comments
an6285:
20170828 16:38:38
tutorial level :v 

aditya_97:
20170828 15:14:07
what could be the reason for run time error?


shahzada:
20170828 14:08:38
tutorial 

amulyagaur:
20170828 12:43:16
Last edit: 20170830 15:34:37 

Vipul Srivastava:
20170827 15:52:03
tutorial 
Added by:  gopikrishna_p 
Date:  20170825 
Time limit:  0.100s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  https://en.wikipedia.org/wiki/Knight_(chess) 