UVA 11764 - Jumping Mario

Problem PDF

Solution:

#include
int main()
{
    int t,n,a[100],i,up,low,j;
    while(scanf("%d",&t)==1)
    {
        for(i=1;i<=t;i++)
        {
            scanf("%d",&n);
            for(j=0;ja[j+1])
                low++;
            }
            printf("Case %d: %d %d\n",i,up,low);
        }
    }



    return 0;
}
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11764/11764.cpp