# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
5043 | jspark19990205 | 지능형 기차 2 (KOI11_train2) | C++98 | 0 ms | 1088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |