UVA 11850 - Alaska

UVA Sep 1, 2020

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

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.