Skip to content

Instantly share code, notes, and snippets.

@kerolloz
Created September 29, 2018 08:34
Show Gist options
  • Save kerolloz/c9f7456da1383bfa8c9eb9c5af6c863b to your computer and use it in GitHub Desktop.
Save kerolloz/c9f7456da1383bfa8c9eb9c5af6c863b to your computer and use it in GitHub Desktop.
#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