Wrong Answer
Code
#include <stdio.h>
int main() {
int T;
scanf("%d", &T);
while (T--) {
int N;
scanf("%d", &N);
int A[N], B[N], C[N];
for (int i = 0; i < N; i++)
scanf("%d", &A[i]);
for (int i = 0; i < N; i++)
scanf("%d", &B[i]);
for (int i = 0; i < N; i++)
scanf("%d", &C[i]);
int sum = 0;
for (int i = 0; i < N; i++) {
int maxV = A[i];
if (B[i] > maxV) maxV = B[i];
if (C[i] > maxV) maxV = C[i];
sum += maxV;
}
printf("%d\n", sum);
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1046 Maximum sum in 3-array
- Contest
- TLE_Headquarters - round #1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2024-03-27 16:37:28
- Judged At
- 2024-11-11 03:38:23
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 552.0 KiB