Submission #16245

# Submission time Handle Problem Language Result Execution time Memory
16245 2015-08-18T11:20:35 Z eaststar 지능형 기차 2 (KOI11_train2) C++14
16 / 16
0 ms 1084 KB
#include <stdio.h>
int main(){
	int i,x,y,s=0,mx=0;
	for(i=1;i<11;++i){
		scanf("%d%d",&x,&y);
		s+=y-x;
		if(mx<s)mx=s;
	}
	printf("%d",mx);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Correct 0 ms 1084 KB Output is correct
4 Correct 0 ms 1084 KB Output is correct
5 Correct 0 ms 1084 KB Output is correct
6 Correct 0 ms 1084 KB Output is correct
7 Correct 0 ms 1084 KB Output is correct
8 Correct 0 ms 1084 KB Output is correct
9 Correct 0 ms 1084 KB Output is correct
10 Correct 0 ms 1084 KB Output is correct