Submission #13434

#TimeUsernameProblemLanguageResultExecution timeMemory
13434hjjang45지능형 기차 2 (KOI11_train2)C++98
16 / 16
0 ms1084 KiB
#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 timeMemoryGrader output
Fetching results...