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 <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);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |