UVA 11799 - Horror Dash

Problem PDF

Solution:

#include
int main()
{
    int t,n,c,k,i,max;
    while (scanf("%d",&t)==1)
    {
        for(i=1;i<=t;i++)
        {
            max=0;
            scanf("%d",&n);
            for (k=0;kmax)
                    max=c;
            }
            printf("Case %d: %ld\n",i,max);
        }
    }
return 0;
}
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11799/11799.cpp