# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
14312 | dydnjs | 지능형 기차 2 (KOI11_train2) | C++98 | 0 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<algorithm>
using namespace std;
int a, b;
int main() {
//freopen("input.txt", "r" ,stdin);
int sum=0, ret=0;
for(int i=0; i<10; i++) {
scanf("%d %d", &a, &b);
int k = b - a;
if(sum < ret+k) {
sum = ret+k;
}
ret+=k;
}
printf("%d\n", sum);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |