#include <iostream>
using namespace std;
int main()
{
int n, sumh=0, sumv=0;
cin>>n;
int H[n];
int V[n];
for(int i=0; i<n; i++)
{
cin>>H[i];
sumh=sumh+H[i];
}
for(int i=0; i<n; i++)
{
cin>>V[i];
sumv=sumv+V[i];
}
int minh=H[0];
int minv=V[0];
for(int i=1; i<n; i++)
{
if(H[i]<minh)
minh=H[i];
}
for(int i=1; i<n; i++)
{
if(V[i]<minv)
minv=V[i];
}
if(sumh<sumv)
cout<<"Hamilton"<<endl;
else
cout<<"Verstappen"<<endl;
if(minh<minv)
cout<<"Hamilton"<<endl;
else
cout<<"Verstappen"<<endl;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1880 KiB | ||||
2 | Accepted | 3ms | 2072 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2280 KiB | ||||
4 | Accepted | 3ms | 2492 KiB | ||||
5 | Accepted | 3ms | 2704 KiB | ||||
6 | Accepted | 3ms | 2916 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 3032 KiB | ||||
8 | Accepted | 3ms | 3160 KiB | ||||
9 | Accepted | 3ms | 3248 KiB | ||||
10 | Accepted | 3ms | 3376 KiB | ||||
11 | Accepted | 3ms | 3616 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3720 KiB | ||||
13 | Accepted | 3ms | 3672 KiB | ||||
14 | Accepted | 3ms | 3904 KiB | ||||
15 | Accepted | 3ms | 3904 KiB | ||||
16 | Accepted | 3ms | 3948 KiB | ||||
17 | Accepted | 3ms | 4072 KiB | ||||
18 | Accepted | 3ms | 4080 KiB | ||||
19 | Accepted | 3ms | 4204 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 4176 KiB | ||||
21 | Accepted | 3ms | 4176 KiB | ||||
22 | Accepted | 3ms | 4176 KiB | ||||
23 | Accepted | 3ms | 4180 KiB | ||||
24 | Accepted | 3ms | 4412 KiB | ||||
25 | Accepted | 3ms | 4388 KiB | ||||
26 | Accepted | 3ms | 4384 KiB | ||||
27 | Accepted | 3ms | 4388 KiB | ||||
28 | Accepted | 3ms | 4524 KiB |