// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
vector<pair<int, int>> a(n);
int osszegham=0;
int legkisebbham=INT_MAX;
for(int i=0;i<n;i++){
cin>>a[i].second;
osszegham+=a[i].second;
legkisebbham=min(legkisebbham, a[i].second);
}
int osszegver=0;
int legkisebbver=INT_MAX;
for(int i=0;i<n;i++){
cin>>a[i].first;
osszegver+=a[i].first;
legkisebbver=min(a[i].first, legkisebbver);
}
if(osszegham>osszegver){
cout<<"Verstappen\n";
}else{
cout<<"Hamilton\n";
}
if(legkisebbver>legkisebbham){
cout<<"Hamilton\n";
}else{
cout<<"Verstappen\n";
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1692 KiB | ||||
2 | Accepted | 3ms | 1924 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 2ms | 2108 KiB | ||||
4 | Accepted | 3ms | 2352 KiB | ||||
5 | Accepted | 2ms | 2464 KiB | ||||
6 | Accepted | 3ms | 2716 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 2928 KiB | ||||
8 | Accepted | 2ms | 2980 KiB | ||||
9 | Accepted | 3ms | 3076 KiB | ||||
10 | Accepted | 3ms | 3316 KiB | ||||
11 | Accepted | 3ms | 3568 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3748 KiB | ||||
13 | Accepted | 2ms | 3672 KiB | ||||
14 | Accepted | 3ms | 3764 KiB | ||||
15 | Accepted | 2ms | 3760 KiB | ||||
16 | Accepted | 3ms | 3884 KiB | ||||
17 | Accepted | 3ms | 3972 KiB | ||||
18 | Accepted | 3ms | 3976 KiB | ||||
19 | Accepted | 2ms | 3972 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 2ms | 3972 KiB | ||||
21 | Accepted | 3ms | 4104 KiB | ||||
22 | Accepted | 3ms | 4184 KiB | ||||
23 | Accepted | 3ms | 4188 KiB | ||||
24 | Accepted | 3ms | 4180 KiB | ||||
25 | Accepted | 3ms | 4172 KiB | ||||
26 | Accepted | 3ms | 4060 KiB | ||||
27 | Accepted | 3ms | 4312 KiB | ||||
28 | Accepted | 3ms | 4288 KiB |