QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#368169 | #2829. Cryptography | hshshs# | WA | 0ms | 3960kb | C++14 | 501b | 2024-03-26 21:24:34 | 2024-03-26 21:24:35 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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'