#include <stdio.h>
int n, m, l;
int i, j;
unsigned int ret;
unsigned int a[1000000], b[1000000], c[2000000];
int main(int argc, char *argv[])
{
scanf("%d", &n);
scanf("%d", &m);
l = n + m + 1;
for (i = 0; i <= n; ++i)
scanf("%u", a+i);
for (i = 0; i <= m; ++i)
scanf("%u", b+i);
for (i = 0; i <= l; ++i) {
c[i] = 0;
for (j = 0; j <= i; ++j) {
c[i] += a[j] * b[i-j];
}
}
ret = c[0];
for (i = 1; i < l; ++i) {
ret ^= c[i];
}
printf("%u\n", ret);
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
16708 KB |
Output is correct |
2 |
Correct |
0 ms |
16708 KB |
Output is correct |
3 |
Correct |
0 ms |
16708 KB |
Output is correct |
4 |
Correct |
0 ms |
16708 KB |
Output is correct |
5 |
Correct |
4 ms |
16708 KB |
Output is correct |
6 |
Correct |
3 ms |
16708 KB |
Output is correct |
7 |
Correct |
4 ms |
16708 KB |
Output is correct |
8 |
Correct |
4 ms |
16708 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
429 ms |
16708 KB |
Output is correct |
2 |
Correct |
7137 ms |
16708 KB |
Output is correct |
3 |
Execution timed out |
10000 ms |
16708 KB |
Program timed out |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |