UVA 11850 - Alaska

Problem PDF

Solution:

#include
#include
using namespace std;
int main()
{
    int n,a[1480],p,i;
    while(scanf("%d",&n)==1)
    {
        if(n==0)
        break;
        for(i=0;i200)
        {
            printf("IMPOSSIBLE\n");
            continue;
        }
        else
        {
            for(i=0;i200)
                {
                    int c=0;
                    break;
                }

            if(c==1)
            printf("IMPOSSIBLE\n");
            else
            printf("POSSIBLE\n");

        }

}

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