Codeforces 1030A A. In Search of an Easy Problem solution

solve in c++:

#include<bits/stdc++.h>
using namespace std;

int main()
{

    int i,t,c=0,ar[101],c1=0;
    while(cin>>t)
    {
        for(i=0; i<t; i++)
        {
            cin>>ar[i];
            if(ar[i]==0)
                c++;
            else if(ar[i]==1)
                c1++;
        }
        if(c1>=1)
            cout<<"HARD"<<endl;
        else
            cout<<"EASY"<<endl;
            c1=0,c=0;
    }

}

No comments

Most View Post

Recent post

Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

    Problem Link  :   https://codeforces.com/contest/1931/problem/D S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. ...

Powered by Blogger.