文件名称:1341
-
所属分类:
- 标签属性:
- 上传时间:2014-11-25
-
文件大小:8.99kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
有一个N*N的字符矩阵,从上到下依次记为第1行,第2行,……,第N行,从左至右依次记为第1列,第2列,……,第N列。
对于这个矩阵会进行一系列操作,但这些操作只有两类:
(1) R: 将矩阵逆时针旋转90度;
(2) P x y: 将此时第x行第y列的字符打印出来,其中1 <= x, y <= N。
输入数据的第一行包含一个整数T (1 <= T <= 20),表示接下来一共有T组测试数据。
对于每组测试数据,第一行包含一个整数N (1 <= N <= 300),含义同上。接下来一共有N行,每行均包含N个大写字母,描述了这个矩阵的初始情况。再接下来一行包含一个整数M (1 <= M <= 10000),表示一共对矩阵进行了M次操作。接下来M行,每行均包含一个符合上述格式的操作,依次描述了这M个操作。
对于每个第(2)类操作,用一行打印出指定位置的字符。
相邻的两组测试数据中间用一个空行隔开。-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.
对于这个矩阵会进行一系列操作,但这些操作只有两类:
(1) R: 将矩阵逆时针旋转90度;
(2) P x y: 将此时第x行第y列的字符打印出来,其中1 <= x, y <= N。
输入数据的第一行包含一个整数T (1 <= T <= 20),表示接下来一共有T组测试数据。
对于每组测试数据,第一行包含一个整数N (1 <= N <= 300),含义同上。接下来一共有N行,每行均包含N个大写字母,描述了这个矩阵的初始情况。再接下来一行包含一个整数M (1 <= M <= 10000),表示一共对矩阵进行了M次操作。接下来M行,每行均包含一个符合上述格式的操作,依次描述了这M个操作。
对于每个第(2)类操作,用一行打印出指定位置的字符。
相邻的两组测试数据中间用一个空行隔开。-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.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Untitled2.c
Untitled2.exe
Untitled2.o
Untitled2.exe
Untitled2.o
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.