Play with a matrix

Problem Name:
Play with a matrix
Site:HackerEarth
Links:
Tags:
Problem setters: