#include <cstdio>
#define MN 1000005
int n, m;
long long a[MN], b[MN];
int main() {
scanf("%d%d", &n, &m);
for (int i = 0; i <= n; i++) scanf("%lld", a + i);
for (int i = 0; i <= m; i++) scanf("%lld", b + i);
long long res = 0, x;
for (int k = 0; k <= n + m; k++) {
x = 0;
for (int i = 0; i <= k; i++) if (i <= n && k-i <= m) x += a[i] * b[k - i];
res ^= x;
}
printf("%lld", res);
}
# |
결과 |
실행 시간 |
메모리 |
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 |
0 ms |
16708 KB |
Output is correct |
6 |
Correct |
3 ms |
16708 KB |
Output is correct |
7 |
Correct |
3 ms |
16708 KB |
Output is correct |
8 |
Correct |
3 ms |
16708 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
405 ms |
16708 KB |
Output is correct |
2 |
Correct |
5357 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 |
- |