/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 332.0 KiB
#2 Wrong Answer 1ms 552.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 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