Submission #5044

# Submission time Handle Problem Language Result Execution time Memory
5044 2014-01-29T08:30:37 Z jspark19990205 지능형 기차 2 (KOI11_train2) C++
16 / 16
0 ms 1676 KB
#include<cstdio>
#include<iostream>

using namespace std;

int out,in,cur,f;

int main()
{
	int i;
	f=-1;
	for(i=0;i<=9;i++)
	{
		scanf("%d %d",&out,&in);
		cur=cur-out+in;
		f=max(f,cur);
	}
	printf("%d",f);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1676 KB Output is correct
2 Correct 0 ms 1676 KB Output is correct
3 Correct 0 ms 1676 KB Output is correct
4 Correct 0 ms 1676 KB Output is correct
5 Correct 0 ms 1676 KB Output is correct
6 Correct 0 ms 1676 KB Output is correct
7 Correct 0 ms 1676 KB Output is correct
8 Correct 0 ms 1676 KB Output is correct
9 Correct 0 ms 1676 KB Output is correct
10 Correct 0 ms 1676 KB Output is correct