#include <iostream>
using namespace std;
int main()
{
int N,o1,o2,k=10000000000,u=100000000000;
cin>>N;
int a[N],b[N];
for(int i=0; i<N; i++)
cin>>a[i];
for(int i=0; i<N; i++)
cin>>b[i];
for(int i=0; i<N; i++)
o1=o1+a[i];
for(int i=0; i<N; i++)
o2=o2+b[i];
if(o1<o2)
cout<<"Hamilton"<<endl;
else
cout<<"Verstappen"<<endl;
for(int i=0; i<N; i++)
{
if(a[i]<k)
k=a[i];
}
for(int i=0; i<N; i++)
{
if(b[i]<u)
u=b[i];
}
if(k<u)
cout<<"Hamilton";
else
cout<<"Verstappen";
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2120 KiB | ||||
subtask2 | 0/10 | ||||||
3 | Accepted | 3ms | 2364 KiB | ||||
4 | Wrong answer | 3ms | 2572 KiB | ||||
5 | Accepted | 3ms | 2644 KiB | ||||
6 | Wrong answer | 3ms | 2888 KiB | ||||
subtask3 | 0/15 | ||||||
7 | Wrong answer | 3ms | 3244 KiB | ||||
8 | Wrong answer | 3ms | 3192 KiB | ||||
9 | Accepted | 3ms | 3240 KiB | ||||
10 | Accepted | 3ms | 3244 KiB | ||||
11 | Wrong answer | 3ms | 3396 KiB | ||||
subtask4 | 0/20 | ||||||
12 | Wrong answer | 3ms | 3664 KiB | ||||
13 | Wrong answer | 3ms | 3608 KiB | ||||
14 | Accepted | 3ms | 3608 KiB | ||||
15 | Accepted | 2ms | 3676 KiB | ||||
16 | Wrong answer | 3ms | 3808 KiB | ||||
17 | Accepted | 3ms | 3916 KiB | ||||
18 | Accepted | 3ms | 3892 KiB | ||||
19 | Wrong answer | 3ms | 3888 KiB | ||||
subtask5 | 0/55 | ||||||
20 | Accepted | 3ms | 4168 KiB | ||||
21 | Accepted | 3ms | 4088 KiB | ||||
22 | Accepted | 3ms | 4224 KiB | ||||
23 | Wrong answer | 3ms | 4304 KiB | ||||
24 | Accepted | 3ms | 4304 KiB | ||||
25 | Accepted | 3ms | 4316 KiB | ||||
26 | Wrong answer | 3ms | 4316 KiB | ||||
27 | Wrong answer | 3ms | 4432 KiB | ||||
28 | Wrong answer | 3ms | 4320 KiB |