Uva solution 13034 Solve Everything

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,x,arr,c=0;
    cin>>n;
    for(int j=1; j<=n; j++)
    {
        c=0;
        for(int i=1; i<=13; i++)
        {
            cin>>arr;
            if(arr>=1)
            {
                c++;
            }
        }
        if(c==13)
        {
            printf("Set #%d: Yes\n",j);
        }
        else
        {
            printf("Set #%d: No\n",j);

        }
    }
    return 0;
}

Comments

Popular posts from this blog

Codeforces Solution 230B T-primes

Uri Solution 2747 Output 1