Submission #14311

#TimeUsernameProblemLanguageResultExecution timeMemory
14311dydnjs지능형 기차 2 (KOI11_train2)C++98
1.60 / 16
0 ms1084 KiB
#include<stdio.h> #include<algorithm> using namespace std; int a[4], b[4]; int main() { //freopen("input.txt", "r" ,stdin); int sum=0; for(int i=0; i<10; i++) { scanf("%d %d", &a[i], &b[i]); int k = b[i] - a[i]; if(sum < sum+k) { sum = sum+k; } } printf("%d\n", sum); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...