QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#368169#2829. Cryptographyhshshs#WA 0ms3960kbC++14501b2024-03-26 21:24:342024-03-26 21:24:35

Judging History

你现在查看的是最新测评结果

  • [2024-03-26 21:24:35]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3960kb
  • [2024-03-26 21:24:34]
  • 提交

answer

#include<bits/stdc++.h>
#define maxn 100010
using namespace std;
int n,q,a1,a2,x,y;
int f[maxn],g[maxn],h[maxn],d[maxn];
int main() {
//	freopen("1.in", "r", stdin); 
    while(~scanf("%d%d",&n,&q)){
	    n=(1<<n);
		for(int i=0;i<n;i++)scanf("%d",&f[i]);
		for(int i=0;i<n;i++){scanf("%d",&g[i]);d[g[i]]=i;}
		for(int i=0;i<n;i++)scanf("%d",&h[i]);
		while(q--){
			scanf("%d%d",&a1,&a2);
			y=g[a2^h[a1]]^a1;
			x=d[a1^y]^f[y];
			printf("%d %d\n",x,y);
		}   	
	}
	return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3960kb

input:

2 2
0 1 2 3
1 2 3 0
2 3 0 1
0 1
2 3
1 1
0 0
0 0
0 0
0 0

output:

3 0
1 2
1 0

result:

wrong answer 3rd lines differ - expected: '0 0', found: '1 0'