The link to the question : https://www.codechef.com/SEPT18B/problems/TABGAME
Link to the submission : https://www.codechef.com/viewsolution/20145946
The link to the question : https://www.codechef.com/SEPT18B/problems/TABGAME
Link to the submission : https://www.codechef.com/viewsolution/20145946
you should use 2-D array like row[2][m] for horizontal and col[n][2] for vertical to save results of first two rows and first two columns and then may apply the diagonally same logic.
here is link to my solution : https://www.codechef.com/viewsolution/20115762
Thanks a lot , but i did not understand the need for storing it in a 2-d array , i am trying to find out where 0’s are in first 2 rows and first 2 columns and all the corresponding diagonal elements will be zero, so i tried to store the difference between the 2 co-ordinates in set so would that require a 2-d array? . Correct me if i am wrong , thnx.