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;
}




目录
相关文章
|
10月前
|
编译器 数据库 C++
参数化查询 '(@UserName nvarchar(1),@PassWord nvarchar(4000))Select * from Us未提供“@PassWord”参数
参数化查询 '(@UserName nvarchar(1),@PassWord nvarchar(4000))Select * from Us未提供“@PassWord”参数
|
Linux 芯片
can&#39;t able to update the design capacity in bq27441-G1
/*************************************************************************** * can't able to update the design capacity in bq27441-G1 * 声明...
978 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
MySQL ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number
异常: ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number 异常.
2223 0