#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n; cin >> n;
vector<int> h(n), v(n);
int hsum = 0, vsum = 0, minh = INT_MAX, minv = INT_MAX;
for(int i = 0; i < n; i++) {
cin >> h[i];
hsum += h[i];
minh = min(minh, h[i]);
}
for(int i = 0; i < n; i++) {
cin >> v[i];
vsum += v[i];
minv = min(minv, v[i]);
}
cout << (hsum < vsum ? "Hamilton\n" : "Verstappen\n");
cout << (minh < minv ? "Hamilton\n" : "Verstappen\n");
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1812 KiB | ||||
2 | Accepted | 3ms | 2052 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2268 KiB | ||||
4 | Accepted | 3ms | 2512 KiB | ||||
5 | Accepted | 3ms | 2724 KiB | ||||
6 | Accepted | 3ms | 2936 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 2ms | 3152 KiB | ||||
8 | Accepted | 3ms | 3276 KiB | ||||
9 | Accepted | 2ms | 3356 KiB | ||||
10 | Accepted | 3ms | 3484 KiB | ||||
11 | Accepted | 3ms | 3608 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 2ms | 3688 KiB | ||||
13 | Accepted | 3ms | 3684 KiB | ||||
14 | Accepted | 2ms | 3804 KiB | ||||
15 | Accepted | 3ms | 3688 KiB | ||||
16 | Accepted | 3ms | 3808 KiB | ||||
17 | Accepted | 2ms | 3688 KiB | ||||
18 | Accepted | 3ms | 3816 KiB | ||||
19 | Accepted | 2ms | 3900 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 3780 KiB | ||||
21 | Accepted | 3ms | 3780 KiB | ||||
22 | Accepted | 3ms | 3912 KiB | ||||
23 | Accepted | 3ms | 4056 KiB | ||||
24 | Accepted | 3ms | 4128 KiB | ||||
25 | Accepted | 3ms | 4124 KiB | ||||
26 | Accepted | 3ms | 4396 KiB | ||||
27 | Accepted | 3ms | 4412 KiB | ||||
28 | Accepted | 3ms | 4304 KiB |