Submission #14593

# Submission time Handle Problem Language Result Execution time Memory
14593 2015-05-20T23:02:45 Z ioojh6654 지능형 기차 2 (KOI11_train2) C++
16 / 16
0 ms 1084 KB
#include<stdio.h>

int main()
{
	int human=0, compare=0 ,a, b, i;
	for(i=1; i<=10; i++)
	{
		scanf("%d%d", &a, &b);
		human=human-a;
		human=human+b;
		if(compare>=human) compare=compare;
		else if(compare<human) compare=human;
	}
	printf("%d", compare);
}
# 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