답안 #14311

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
14311 2015-05-12T01:25:10 Z dydnjs 지능형 기차 2 (KOI11_train2) C++
1.6 / 16
0 ms 1084 KB
#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;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Incorrect 0 ms 1084 KB Output isn't correct
3 Incorrect 0 ms 1084 KB Output isn't correct
4 Correct 0 ms 1084 KB Output is correct
5 Incorrect 0 ms 1084 KB Output isn't correct
6 Incorrect 0 ms 1084 KB Output isn't correct
7 Incorrect 0 ms 1084 KB Output isn't correct
8 Incorrect 0 ms 1084 KB Output isn't correct
9 Incorrect 0 ms 1084 KB Output isn't correct
10 Incorrect 0 ms 1084 KB Output isn't correct