#include <iostream>
using namespace std;
bool ok=false;
int n,a,i,h,v,m=100001;
int main()
{
cin>>n;
for(i=1;i<=n;++i)
{
cin>>a;
h+=a;
if(a<m) m=a;
}
for(i=1;i<=n;++i)
{
cin>>a;
v+=a;
if(a<m)
{
m=a;
ok=true;
}
}
if(h<v) cout<<"Hamilton"<<"\n";
else cout<<"Verstappen"<<"\n";
if(ok) cout<<"Verstappen";
else cout<<"Hamilton";
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2072 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2280 KiB | ||||
4 | Accepted | 2ms | 2520 KiB | ||||
5 | Accepted | 2ms | 2604 KiB | ||||
6 | Accepted | 3ms | 2860 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 3044 KiB | ||||
8 | Accepted | 3ms | 3128 KiB | ||||
9 | Accepted | 3ms | 3340 KiB | ||||
10 | Accepted | 3ms | 3424 KiB | ||||
11 | Accepted | 3ms | 3556 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3760 KiB | ||||
13 | Accepted | 3ms | 3884 KiB | ||||
14 | Accepted | 2ms | 3996 KiB | ||||
15 | Accepted | 3ms | 4084 KiB | ||||
16 | Accepted | 3ms | 4100 KiB | ||||
17 | Accepted | 2ms | 4176 KiB | ||||
18 | Accepted | 3ms | 4308 KiB | ||||
19 | Accepted | 3ms | 4428 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 4520 KiB | ||||
21 | Accepted | 3ms | 4592 KiB | ||||
22 | Accepted | 3ms | 4488 KiB | ||||
23 | Accepted | 3ms | 4592 KiB | ||||
24 | Accepted | 3ms | 4600 KiB | ||||
25 | Accepted | 3ms | 4480 KiB | ||||
26 | Accepted | 3ms | 4488 KiB | ||||
27 | Accepted | 3ms | 4756 KiB | ||||
28 | Accepted | 3ms | 4664 KiB |