-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest2.cpp
More file actions
61 lines (51 loc) · 933 Bytes
/
test2.cpp
File metadata and controls
61 lines (51 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "copypaste/debug.h"
#else
#define debug(...) 42
#endif
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef array<int, 2> a2;
struct fast_ios {
fast_ios() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
};
} fast_ios_;
void solve() {
int n;
cin >> n;
vector<int> a(n);
int mx = 0;
int sum = 0;
for (int i = 0; i < n; i++) {
cin >> a[i];
mx = max(mx, a[i]);
sum += a[i];
}
int other = sum - mx;
if (mx > other) {
cout << "T\n";
return;
}
if (sum % 2) {
cout << "T\n";
} else {
cout << "HL\n";
}
}
int main() {
#ifdef LOCAL
freopen("./data.in", "r", stdin);
#endif
int T;
cin >> T;
while (T--) {
solve();
}
return 0;
}