#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <vector>
using namespace std;
int main() {
int n, k=0, l=0;
cin>>n;
int ido1[n], ido2[n];
for(int i=0;i<n;i++){
cin>>ido1[i];
k+=ido1[i];
}
for(int i=0;i<n;i++){
cin>>ido2[i];
l+=ido2[i];
}
if(k<l){
cout<<"Hamilton";
}else{
cout<<"Verstappen";
}
cout<<endl;
sort(ido1, ido1+n);
sort(ido2, ido2+n);
if(ido1[0]<ido2[0]){
cout<<"Hamilton";
}else{
cout<<"Verstappen";
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 2040 KiB | ||||
2 | Accepted | 3ms | 2232 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 3ms | 2376 KiB | ||||
4 | Accepted | 3ms | 2592 KiB | ||||
5 | Accepted | 3ms | 2728 KiB | ||||
6 | Accepted | 3ms | 2708 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 2768 KiB | ||||
8 | Accepted | 3ms | 2828 KiB | ||||
9 | Accepted | 3ms | 2916 KiB | ||||
10 | Accepted | 3ms | 3036 KiB | ||||
11 | Accepted | 3ms | 3028 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3072 KiB | ||||
13 | Accepted | 3ms | 3192 KiB | ||||
14 | Accepted | 3ms | 3248 KiB | ||||
15 | Accepted | 3ms | 3376 KiB | ||||
16 | Accepted | 3ms | 3388 KiB | ||||
17 | Accepted | 3ms | 3668 KiB | ||||
18 | Accepted | 3ms | 3756 KiB | ||||
19 | Accepted | 3ms | 3748 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 3760 KiB | ||||
21 | Accepted | 3ms | 4160 KiB | ||||
22 | Accepted | 3ms | 3864 KiB | ||||
23 | Accepted | 3ms | 3864 KiB | ||||
24 | Accepted | 3ms | 3864 KiB | ||||
25 | Accepted | 3ms | 3864 KiB | ||||
26 | Accepted | 3ms | 3868 KiB | ||||
27 | Accepted | 3ms | 3868 KiB | ||||
28 | Accepted | 3ms | 3872 KiB |