#include <iostream>
#include <string>
int main(){
int n;
std::cin>>n;
int v[n], h[n];
int vv=0;
int hh=0;
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 > 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 | Wrong answer | 3ms | 1748 KiB | ||||
2 | Accepted | 3ms | 1996 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2252 KiB | ||||
4 | Accepted | 3ms | 2460 KiB | ||||
5 | Accepted | 3ms | 2668 KiB | ||||
6 | Accepted | 3ms | 2884 KiB | ||||
subtask3 | 0/15 | ||||||
7 | Accepted | 3ms | 2960 KiB | ||||
8 | Wrong answer | 3ms | 3060 KiB | ||||
9 | Accepted | 3ms | 3272 KiB | ||||
10 | Wrong answer | 3ms | 3512 KiB | ||||
11 | Wrong answer | 2ms | 3636 KiB | ||||
subtask4 | 0/20 | ||||||
12 | Accepted | 3ms | 3660 KiB | ||||
13 | Accepted | 3ms | 3516 KiB | ||||
14 | Accepted | 3ms | 3508 KiB | ||||
15 | Accepted | 3ms | 3632 KiB | ||||
16 | Accepted | 3ms | 3512 KiB | ||||
17 | Accepted | 3ms | 3784 KiB | ||||
18 | Accepted | 3ms | 3672 KiB | ||||
19 | Wrong answer | 3ms | 3792 KiB | ||||
subtask5 | 0/55 | ||||||
20 | Accepted | 3ms | 3560 KiB | ||||
21 | Accepted | 3ms | 3668 KiB | ||||
22 | Accepted | 3ms | 3664 KiB | ||||
23 | Accepted | 3ms | 3664 KiB | ||||
24 | Accepted | 3ms | 3784 KiB | ||||
25 | Accepted | 2ms | 3788 KiB | ||||
26 | Wrong answer | 3ms | 3788 KiB | ||||
27 | Accepted | 3ms | 3788 KiB | ||||
28 | Wrong answer | 3ms | 3788 KiB |