#include <iostream>
#include <vector>
#include <climits>
using namespace std;
int sum(vector <int> v, int n){
int s = 0;
for(int i=0;i<n;i++){
s = s+v[i];
}
return s;
}
int minn(vector <int> v, int n){
int m = INT_MAX;
for(int i=0;i<n;i++){
if(v[i]<m) m=v[i];
}
return m;
}
int main(){
int n,h,v;
vector <int> hh,vv;
cin>>n;
for(int i=0;i<n;i++){
cin>>h;
hh.push_back(h);
}
for(int i=0;i<n;i++){
cin>>v;
vv.push_back(v);
}
if(sum(hh,n)<sum(vv,n)) cout<<"Hamilton\n";
else cout<<"Verstappen\n";
if(minn(hh,n)<minn(vv,n)) cout<<"Hamilton\n";
else cout<<"Verstappen\n";
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1808 KiB | ||||
2 | Accepted | 3ms | 2004 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 2ms | 2088 KiB | ||||
4 | Accepted | 3ms | 2216 KiB | ||||
5 | Accepted | 3ms | 2456 KiB | ||||
6 | Accepted | 3ms | 2692 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 2ms | 2728 KiB | ||||
8 | Accepted | 3ms | 2968 KiB | ||||
9 | Accepted | 3ms | 3068 KiB | ||||
10 | Accepted | 3ms | 3148 KiB | ||||
11 | Accepted | 2ms | 3144 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3400 KiB | ||||
13 | Accepted | 3ms | 3472 KiB | ||||
14 | Accepted | 3ms | 3468 KiB | ||||
15 | Accepted | 3ms | 3600 KiB | ||||
16 | Accepted | 3ms | 3676 KiB | ||||
17 | Accepted | 3ms | 3684 KiB | ||||
18 | Accepted | 3ms | 3824 KiB | ||||
19 | Accepted | 2ms | 3900 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 2ms | 4016 KiB | ||||
21 | Accepted | 3ms | 4012 KiB | ||||
22 | Accepted | 3ms | 3896 KiB | ||||
23 | Accepted | 3ms | 4164 KiB | ||||
24 | Accepted | 2ms | 3916 KiB | ||||
25 | Accepted | 3ms | 4112 KiB | ||||
26 | Accepted | 3ms | 4356 KiB | ||||
27 | Accepted | 3ms | 4632 KiB | ||||
28 | Accepted | 3ms | 4660 KiB |