Submission #5043

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

int main()
{
	int n,i=0;
	int max = -1;
	bool np = false;
	while(scanf("%d",&i)==1)
	{
		if(np)
		{
			n +=i;
		}
		else
		{
			n -=1;
		}

		if (max <n)
		{
			max = n;
		}
		np = !np;
	}
	printf("%d\n",max);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1088 KB Output isn't correct
2 Incorrect 0 ms 1088 KB Output isn't correct
3 Incorrect 0 ms 1088 KB Output isn't correct
4 Incorrect 0 ms 1088 KB Output isn't correct
5 Incorrect 0 ms 1088 KB Output isn't correct
6 Incorrect 0 ms 1088 KB Output isn't correct
7 Incorrect 0 ms 1088 KB Output isn't correct
8 Incorrect 0 ms 1088 KB Output isn't correct
9 Incorrect 0 ms 1088 KB Output isn't correct
10 Incorrect 0 ms 1088 KB Output isn't correct