Created
September 29, 2018 08:34
-
-
Save kerolloz/c9f7456da1383bfa8c9eb9c5af6c863b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int main (){ | |
int t; cin >> t; | |
for(int i =0; i < t; i++){ | |
int n, x, y; | |
cin >> n >> x >> y; | |
int arr[n]; | |
for(int j = 0; j < n; j++){ | |
cin >> arr[j]; | |
} | |
bool easy = false, hard = false; | |
if(arr[0] == x) easy = 1; | |
if(arr[n-1] == y) hard = 1; | |
if(easy && hard) cout << "BOTH" << endl; | |
else if(easy) cout << "EASY" << endl; | |
else if(hard) cout << "HARD" << endl; | |
else cout << "OKAY" << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment