fzu 2034 Password table

简介: 点击打开链接fzu 2034 思路:水题暴搞 注意:输出严格要求是01,而不是1所以输出的格式注意一下。 代码: #include#include#include#includeusing namespace std;#d...

点击打开链接fzu 2034

思路:水题暴搞
注意:输出严格要求是01,而不是1所以输出的格式注意一下。

代码:

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;

#define N 10

int T;
int n , m , q;
int G[N][N];
char str[N];

int main(){
   scanf("%d" , &T);
   int t = 1;
   while(T--){
      printf("Case %d:\n" , t++);
      scanf("%d%d%d" , &n , &m , &q);
      for(int i = 1 ; i <= n ; i++){
         for(int j = 1 ; j <= m ; j++)
            scanf("%d" , &G[i][j]);
      } 
      for(int i = 0 ; i < q ; i++){
         scanf("%s" , str);
         printf("%02d" , G[str[1]-'0'][str[0]-'A'+1]);
         printf("%02d" , G[str[3]-'0'][str[2]-'A'+1]);
         printf("%02d\n" , G[str[5]-'0'][str[4]-'A'+1]);
      }
   }
   return 0;
}




目录
相关文章
|
7月前
BUUCTF password 1
BUUCTF password 1
102 0
|
10月前
|
SQL 关系型数据库 MySQL
【问题解决】MySQL5.5 向MySQL数据库中插入汉字时,提示:Incorrect string value: '\Xe7\x8E...' for column 'XXX' at row 1
【问题解决】MySQL5.5 向MySQL数据库中插入汉字时,提示:Incorrect string value: '\Xe7\x8E...' for column 'XXX' at row 1
|
10月前
|
编译器 数据库 C++
参数化查询 '(@UserName nvarchar(1),@PassWord nvarchar(4000))Select * from Us未提供“@PassWord”参数
参数化查询 '(@UserName nvarchar(1),@PassWord nvarchar(4000))Select * from Us未提供“@PassWord”参数
|
存储 关系型数据库 MySQL
MySQL出现Data too long for column...(错误号1406)和 Data truncated for column...(错误号1265)
MySQL出现Data too long for column...(错误号1406)和 Data truncated for column...(错误号1265)
575 0
MySQL出现Data too long for column...(错误号1406)和 Data truncated for column...(错误号1265)
|
关系型数据库 MySQL 数据库
【MySQL】mysql-ERROR 1366 (HY000): Incorrect string value: ‘\xD5\xC5\xC8\xFD‘ for column ‘name‘ at row
简介:【MySQL】mysql-ERROR 1366 (HY000): Incorrect string value: ‘\xD5\xC5\xC8\xFD‘ for column ‘name‘ at row
|
关系型数据库 MySQL
【Mysql】报#1166 - Incorrect column name 'UId '
【Mysql】报#1166 - Incorrect column name 'UId '
91 0
【1035】Password (20 分)
【1035】Password (20 分) 【1035】Password (20 分)
88 0
|
关系型数据库 MySQL 数据库
[Err] 1143 - SELECT command denied to user 'XX'@'%' for column 'XXX' in table 'XX'
[Err] 1143 - SELECT command denied to user 'XX'@'%' for column 'XXX' in table 'XX'
220 0
[Err] 1143 - SELECT command denied to user 'XX'@'%' for column 'XXX' in table 'XX'
|
关系型数据库 MySQL 数据库
Incorrect string value: &#39;...&#39; for column &#39;course&#39; at row 1MySQL插入中文错误:
Incorrect string value: &#39;...&#39; for column &#39;course&#39; at row 1MySQL插入中文错误:
94 0
Incorrect string value: &#39;...&#39; for column &#39;course&#39; at row 1MySQL插入中文错误: