SP12397 LCPC12B - Johnny plays with connect 4

Description

Description =========== _"Connect Four_ _is a two-player game in which the players first choose a color and then take turns dropping colored discs from the top into a seven-column, six-row grid. The pieces fall straight down, occupying the next available space within the column. The objective of the game is to connect four of one's own discs of the same color next to each other vertically, horizontally, or diagonally before his opponent."_ _– Wikipedia._ Johnny plays with the connect-four board, Johnny has N discs and each disc has a number on it. Johnny drops these discs in the board columns. as Johnny was nervous he closed the top of the board and rotated it with different angles, when he rotate the board 90 degree, all pieces slide over their rows till they hit the board boundary or touch another piece. You will be given the board configuration and those rotation angles. And you should write a program that calculates the new discs’ positions. Input Format ------------ Input will start with **_T_** number of test cases. Followed by **_T_** test cases each test case starts with board dimensions **_R_** and **_C_** where **_R_** (1 < **_R_** < 100) is number of rows and **_C_** (1 < **_C_** < 100) is number of columns, and number of discs **_N_** (0

Input Format

N/A

Output Format

N/A