#include <iostream>
using namespace std;
int main()
{
int N,osszh=0,osszv=0,minkor=100000,minkorny;
cin>>N;
int H[N];
int V[N];
for(int i=1;i<=N;i++)
{
cin>>H[i];
if(H[i]<minkor)
{
minkor=H[i];
minkorny=0;
}
}
for(int i=1;i<=N;i++)
{
cin>>V[i];
if(V[i]<minkor)
{
minkor=V[i];
minkorny=1;
}
}
for(int i=1;i<=N;i++)
{
osszh=osszh+H[i];
osszv=osszv+V[i];
}
if(osszh<osszv)
cout<<"Hamilton"<<endl;
else
cout<<"Verstappen"<<endl;
if(minkorny==0)
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 | 2120 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2328 KiB | ||||
4 | Accepted | 3ms | 2524 KiB | ||||
5 | Accepted | 2ms | 2572 KiB | ||||
6 | Accepted | 3ms | 2700 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 2828 KiB | ||||
8 | Accepted | 3ms | 2956 KiB | ||||
9 | Accepted | 3ms | 3132 KiB | ||||
10 | Accepted | 3ms | 3240 KiB | ||||
11 | Accepted | 3ms | 3236 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3356 KiB | ||||
13 | Accepted | 3ms | 3580 KiB | ||||
14 | Accepted | 3ms | 3524 KiB | ||||
15 | Accepted | 3ms | 3524 KiB | ||||
16 | Accepted | 3ms | 3652 KiB | ||||
17 | Accepted | 3ms | 3900 KiB | ||||
18 | Accepted | 3ms | 3948 KiB | ||||
19 | Accepted | 3ms | 4060 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 4068 KiB | ||||
21 | Accepted | 3ms | 4304 KiB | ||||
22 | Accepted | 3ms | 4440 KiB | ||||
23 | Accepted | 3ms | 4672 KiB | ||||
24 | Accepted | 3ms | 4892 KiB | ||||
25 | Accepted | 3ms | 4944 KiB | ||||
26 | Accepted | 3ms | 5064 KiB | ||||
27 | Accepted | 3ms | 5056 KiB | ||||
28 | Accepted | 3ms | 5064 KiB |