/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 332.0 KiB
#2 Wrong Answer 1ms 328.0 KiB

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 maxVal = A[i];
            if (B[i] > maxVal) maxVal = B[i];
            if (C[i] > maxVal) maxVal = C[i];
            sum += maxVal;
        }
        
        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:34:43
Judged At
2024-11-11 03:38:27
Judged By
Score
0
Total Time
1ms
Peak Memory
332.0 KiB