답안 #12840

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
12840 2015-01-10T00:18:46 Z yongwhan 지능형 기차 2 (KOI11_train2) C++
16 / 16
0 ms 1668 KB
#include <fstream>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
using namespace std;

int main() {
 ios_base::sync_with_stdio(false); cin.tie(NULL);
 int mx=0, x,y, cur=0;
 for (int i=0; i<10; i++) cin>>x>>y, cur+=(y-x), mx=max(mx,cur);
 cout << mx << endl;
 return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1668 KB Output is correct
2 Correct 0 ms 1668 KB Output is correct
3 Correct 0 ms 1668 KB Output is correct
4 Correct 0 ms 1668 KB Output is correct
5 Correct 0 ms 1668 KB Output is correct
6 Correct 0 ms 1668 KB Output is correct
7 Correct 0 ms 1668 KB Output is correct
8 Correct 0 ms 1668 KB Output is correct
9 Correct 0 ms 1668 KB Output is correct
10 Correct 0 ms 1668 KB Output is correct