This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
int main(){
int N, M;
scanf("%d %d", &N, &M);
int *a = (int *)malloc(sizeof(int) * (N + 1));
int *b = (int *)malloc(sizeof(int) * (M + 1));
for (int i = 0; i <= N; i++)
scanf("%d", &a[i]);
for (int i = 0; i <= M; i++)
scanf("%d", &b[i]);
int *c = (int *)calloc(N + M + 1, sizeof(int));
for (int i = 0; i <= N; i++){
for (int j = 0; j <= M; j++){
c[i + j] += a[i] * b[j];
}
}
int r = c[0];
for (int i = 1; i <= N + M; i++)
r ^= c[i];
printf("%d", r);
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... |