Advertisement
Saleh127

CF 1397D

Sep 2nd, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; while(t--)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. test
  11. {
  12. ll a[10000],c,d=0,e,i,j,k,l;
  13. cin>>c;
  14. for(i=0;i<c;i++)
  15. {
  16. cin>>a[i];
  17. d+=a[i];
  18. }
  19. sort(a,a+c,greater<int>());
  20. if(d%2 || a[0]*2>d)
  21. {
  22. cout<<"T"<<endl;
  23. }
  24. else cout<<"HL"<<endl;
  25. }
  26.  
  27.  
  28. return 0;
  29. }
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement