manas agrawal's submission of Counting Matrices | CodeChef