#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, hmin=1000000, hcnt=0, vcnt=0; cin>>n;
for(int i=0;i<n;i++){
int x; cin>>x;
hcnt+=x;
if(x<hmin) hmin=x;
}
bool b=true;
for(int i=0;i<n;i++){
int x; cin>>x;
vcnt+=x;
if(x<hmin)b=false;
}
if(hcnt<vcnt) cout<<"Hamilton"<<endl;
else cout<<"Verstappen"<<endl;
if(b) cout<<"Hamilton";
else cout<<"Verstappen";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1872 KiB | ||||
2 | Accepted | 3ms | 2076 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 2ms | 2156 KiB | ||||
4 | Accepted | 3ms | 2296 KiB | ||||
5 | Accepted | 2ms | 2380 KiB | ||||
6 | Accepted | 3ms | 2624 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 2ms | 2708 KiB | ||||
8 | Accepted | 2ms | 2852 KiB | ||||
9 | Accepted | 3ms | 3004 KiB | ||||
10 | Accepted | 3ms | 3188 KiB | ||||
11 | Accepted | 3ms | 3404 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3620 KiB | ||||
13 | Accepted | 3ms | 3708 KiB | ||||
14 | Accepted | 3ms | 3952 KiB | ||||
15 | Accepted | 3ms | 4116 KiB | ||||
16 | Accepted | 3ms | 4112 KiB | ||||
17 | Accepted | 3ms | 4216 KiB | ||||
18 | Accepted | 2ms | 4328 KiB | ||||
19 | Accepted | 3ms | 4448 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 4456 KiB | ||||
21 | Accepted | 3ms | 4376 KiB | ||||
22 | Accepted | 3ms | 4380 KiB | ||||
23 | Accepted | 3ms | 4388 KiB | ||||
24 | Accepted | 3ms | 4384 KiB | ||||
25 | Accepted | 3ms | 4392 KiB | ||||
26 | Accepted | 3ms | 4632 KiB | ||||
27 | Accepted | 3ms | 4752 KiB | ||||
28 | Accepted | 3ms | 4748 KiB |