#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;
}
}
std::cout<<vv<<" "<<hh<<" "<<ham<<std::endl;
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 | 1876 KiB | ||||
2 | Wrong answer | 3ms | 2124 KiB | ||||
subtask2 | 0/10 | ||||||
3 | Wrong answer | 3ms | 2360 KiB | ||||
4 | Wrong answer | 3ms | 2620 KiB | ||||
5 | Wrong answer | 3ms | 2832 KiB | ||||
6 | Wrong answer | 3ms | 2876 KiB | ||||
subtask3 | 0/15 | ||||||
7 | Wrong answer | 3ms | 3128 KiB | ||||
8 | Wrong answer | 3ms | 3144 KiB | ||||
9 | Wrong answer | 3ms | 3364 KiB | ||||
10 | Wrong answer | 3ms | 3540 KiB | ||||
11 | Wrong answer | 3ms | 3788 KiB | ||||
subtask4 | 0/20 | ||||||
12 | Wrong answer | 3ms | 3832 KiB | ||||
13 | Wrong answer | 3ms | 3932 KiB | ||||
14 | Wrong answer | 3ms | 3956 KiB | ||||
15 | Wrong answer | 3ms | 4056 KiB | ||||
16 | Wrong answer | 3ms | 4180 KiB | ||||
17 | Wrong answer | 3ms | 4256 KiB | ||||
18 | Wrong answer | 3ms | 4472 KiB | ||||
19 | Wrong answer | 3ms | 4552 KiB | ||||
subtask5 | 0/55 | ||||||
20 | Wrong answer | 3ms | 4676 KiB | ||||
21 | Wrong answer | 3ms | 4920 KiB | ||||
22 | Wrong answer | 3ms | 4916 KiB | ||||
23 | Wrong answer | 3ms | 4908 KiB | ||||
24 | Wrong answer | 3ms | 4896 KiB | ||||
25 | Wrong answer | 3ms | 4880 KiB | ||||
26 | Wrong answer | 3ms | 5004 KiB | ||||
27 | Wrong answer | 3ms | 4888 KiB | ||||
28 | Wrong answer | 3ms | 4980 KiB |