#include <iostream>
#include <string>
int main(){
int n;
std::cin>>n;
int v[n], h[n];
int vv;
int hh;
int nn;
bool ham;
for (int i = 0; i < n; i++)
{
std::cin>>h[i];
}
for (int i = 0; i < n; i++)
{
std::cin>>v[i];
}
if (v[0] < h[0]){
nn = v[0];
ham = false;
}
else {
nn = h[0];
ham = true;
}
for (int i = 0; i < n; i++){
if(v[i] < h[i]){
vv++;
}
else {
hh++;
}
if (v[i] < nn) {
nn = v[i];
ham = false;
}
else if (h[i] < nn) {
nn = h[i];
ham = true;
}
}
if (vv-4607 > hh) std::cout<<"Verstappen"<<std::endl;
else std::cout<<"Hamilton"<<std::endl;
if (ham) std::cout<<"Hamilton";
else std::cout<<"Verstappen";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Wrong answer | 3ms | 2072 KiB | ||||
subtask2 | 0/10 | ||||||
3 | Wrong answer | 2ms | 2152 KiB | ||||
4 | Accepted | 3ms | 2292 KiB | ||||
5 | Wrong answer | 3ms | 2500 KiB | ||||
6 | Accepted | 2ms | 2624 KiB | ||||
subtask3 | 0/15 | ||||||
7 | Accepted | 3ms | 2652 KiB | ||||
8 | Accepted | 3ms | 2848 KiB | ||||
9 | Wrong answer | 3ms | 3064 KiB | ||||
10 | Wrong answer | 3ms | 3240 KiB | ||||
11 | Accepted | 3ms | 3360 KiB | ||||
subtask4 | 0/20 | ||||||
12 | Accepted | 3ms | 3476 KiB | ||||
13 | Accepted | 3ms | 3576 KiB | ||||
14 | Wrong answer | 3ms | 3688 KiB | ||||
15 | Wrong answer | 3ms | 3768 KiB | ||||
16 | Accepted | 3ms | 3644 KiB | ||||
17 | Wrong answer | 3ms | 3652 KiB | ||||
18 | Wrong answer | 3ms | 3780 KiB | ||||
19 | Accepted | 3ms | 4028 KiB | ||||
subtask5 | 0/55 | ||||||
20 | Wrong answer | 3ms | 4116 KiB | ||||
21 | Wrong answer | 3ms | 4116 KiB | ||||
22 | Wrong answer | 3ms | 4324 KiB | ||||
23 | Accepted | 3ms | 4408 KiB | ||||
24 | Wrong answer | 3ms | 4404 KiB | ||||
25 | Wrong answer | 3ms | 4524 KiB | ||||
26 | Accepted | 3ms | 4556 KiB | ||||
27 | Accepted | 3ms | 4544 KiB | ||||
28 | Accepted | 3ms | 4288 KiB |