Submission #14310

#TimeUsernameProblemLanguageResultExecution timeMemory
14310dydnjs지능형 기차 2 (KOI11_train2)C++98
3.20 / 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<4; 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...