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 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h &g...

Powered by Blogger.