답안 #16327

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
16327 2015-08-21T10:40:06 Z comet 지능형 기차 2 (KOI11_train2) C++
16 / 16
0 ms 1716 KB
#include<iostream>
using namespace std;
int main(){
	int sum=0,ans=0,x,y;
	for(int i=0;i<10;i++){
		cin>>x>>y;
		sum-=x;
		sum+=y;
		ans=max(ans,sum);
	}
	cout<<ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 1716 KB Output is correct
2 Correct 0 ms 1716 KB Output is correct
3 Correct 0 ms 1716 KB Output is correct
4 Correct 0 ms 1716 KB Output is correct
5 Correct 0 ms 1716 KB Output is correct
6 Correct 0 ms 1716 KB Output is correct
7 Correct 0 ms 1716 KB Output is correct
8 Correct 0 ms 1716 KB Output is correct
9 Correct 0 ms 1716 KB Output is correct
10 Correct 0 ms 1716 KB Output is correct