fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n, first, x;
  6.  
  7. cin>>n>>first;
  8.  
  9. int min=first, max=first;
  10.  
  11. for(int i=1;i<n;i++){
  12. cin>>x;
  13.  
  14. if(x<min)
  15. min=x;
  16. else if(x>max)
  17. max=x;
  18. }
  19.  
  20. if(first==min)
  21. cout<<"ez";
  22. else if(first==max)
  23. cout<<"hard";
  24. else
  25. cout<<"?";
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 5324KB
stdin
4
10
30
20
40
stdout
ez