Submission #15089

#TimeUsernameProblemLanguageResultExecution timeMemory
15089sujin씽크스몰 (kriii3_TT)C++98
10 / 30
10000 ms2424 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...