#include <cstdio>
int n, m;
int a[1005], b[1005];
int r[2005];
int main(){
scanf("%d %d",&n,&m);
for(int i=0; i<=n; i++){
scanf("%d",&a[i]);
}
for(int i=0; i<=m; i++){
scanf("%d",&b[i]);
}
for(int i=0; i<=n; i++){
for(int j=0; j<=m; j++){
r[i+j] += a[i] * b[j];
}
}
int ret = 0;
for(int i=0; i<=n+m; i++){
ret ^= r[i];
}
printf("%d",ret);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1100 KB |
Output is correct |
2 |
Correct |
0 ms |
1100 KB |
Output is correct |
3 |
Correct |
0 ms |
1100 KB |
Output is correct |
4 |
Correct |
0 ms |
1100 KB |
Output is correct |
5 |
Correct |
2 ms |
1100 KB |
Output is correct |
6 |
Correct |
0 ms |
1100 KB |
Output is correct |
7 |
Correct |
2 ms |
1100 KB |
Output is correct |
8 |
Correct |
2 ms |
1100 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
1100 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |