Submission #13434

# Submission time Handle Problem Language Result Execution time Memory
13434 2015-02-20T08:54:25 Z hjjang45 지능형 기차 2 (KOI11_train2) C++
16 / 16
0 ms 1084 KB
#include <stdio.h> 
#include <stdlib.h> 
int main() 
{ 
    int in[20],ex[20],max=0,sum=0,i,j; 
    for(i=1;i<=10;i++) 
    { 
        scanf("%d %d",&ex[i],&in[i]); 
    } 
    for(i=1;i<=10;i++) 
    { 
        sum = sum - ex[i]; 
        sum = sum + in[i]; 
        if(max < sum) 
        { 
            max = sum; 
        } 
    } 
    printf("%d",max);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Correct 0 ms 1084 KB Output is correct
4 Correct 0 ms 1084 KB Output is correct
5 Correct 0 ms 1084 KB Output is correct
6 Correct 0 ms 1084 KB Output is correct
7 Correct 0 ms 1084 KB Output is correct
8 Correct 0 ms 1084 KB Output is correct
9 Correct 0 ms 1084 KB Output is correct
10 Correct 0 ms 1084 KB Output is correct