This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |