제출 #14593

#제출 시각아이디문제언어결과실행 시간메모리
14593ioojh6654지능형 기차 2 (KOI11_train2)C++98
16 / 16
0 ms1084 KiB
#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 timeMemoryGrader output
Fetching results...