#include <iostream>
#include <string>
int main(){
int n;
std::cin>>n;
int v[n], h[n];
int vv=0;
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 > 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 | 1872 KiB | ||||
2 | Accepted | 3ms | 2120 KiB | ||||
subtask2 | 0/10 | ||||||
3 | Accepted | 3ms | 2336 KiB | ||||
4 | Wrong answer | 3ms | 2544 KiB | ||||
5 | Accepted | 3ms | 2796 KiB | ||||
6 | Wrong answer | 3ms | 2968 KiB | ||||
subtask3 | 0/15 | ||||||
7 | Wrong answer | 3ms | 3184 KiB | ||||
8 | Wrong answer | 3ms | 3372 KiB | ||||
9 | Accepted | 3ms | 3584 KiB | ||||
10 | Wrong answer | 3ms | 3828 KiB | ||||
11 | Wrong answer | 3ms | 4072 KiB | ||||
subtask4 | 0/20 | ||||||
12 | Wrong answer | 3ms | 4120 KiB | ||||
13 | Wrong answer | 3ms | 4148 KiB | ||||
14 | Accepted | 3ms | 4312 KiB | ||||
15 | Accepted | 3ms | 4400 KiB | ||||
16 | Wrong answer | 3ms | 4400 KiB | ||||
17 | Accepted | 3ms | 4408 KiB | ||||
18 | Accepted | 3ms | 4532 KiB | ||||
19 | Wrong answer | 2ms | 4412 KiB | ||||
subtask5 | 0/55 | ||||||
20 | Accepted | 3ms | 4380 KiB | ||||
21 | Accepted | 3ms | 4388 KiB | ||||
22 | Accepted | 3ms | 4516 KiB | ||||
23 | Wrong answer | 3ms | 4600 KiB | ||||
24 | Accepted | 2ms | 4716 KiB | ||||
25 | Accepted | 3ms | 4592 KiB | ||||
26 | Wrong answer | 3ms | 4596 KiB | ||||
27 | Wrong answer | 3ms | 4740 KiB | ||||
28 | Wrong answer | 3ms | 4596 KiB |