Description: There is an N* N matrix characters, top to bottom in mind for the first row, second row, ... , the first N rows, left to right followed credited as the first one, the first two, ... first N columns. For this matrix will conduct a series of operations, but these operations are only two types: (1) R: 90 degrees counter-clockwise rotation matrix (2) P xy: the character in the first column x row y print it out, which 1 < = x, y < = N. The first line of input data contains an integer T (1 < = T < = 20), a total of T represents the next set of test data. For each test, the first line contains an integer N (1 < = N < = 300), as defined above. Next, a total of N lines, each line containing N uppercase letters, describing the initial situation this matrix. The next line contains an integer M (1 < = M < = 10000), shows a total of M times for the matrix operation. Next M rows, each row contains an operation in line with the above format, in turn describes the M operation.
To Search:
File list (Check if you may need any files):
Untitled2.c
Untitled2.exe
Untitled2.o