#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
int n;
cin>>n;
int h_ossz =0;
int v_ossz =0;
vector<int> hamilton = {};
vector<int> verstappen ={};
for(int i = 1;i<=n;i++){
int h_kor=0;
cin>>h_kor;
hamilton.push_back(h_kor);
h_ossz += h_kor;
}
for(int i = 1;i<=n;i++){
int v_kor=0;
cin>>v_kor;
verstappen.push_back(v_kor);
v_ossz += v_kor;
}
int legk = hamilton[0];
string name = "Hamilton";
for(int i= 0;i<n;i++){
if(hamilton[i]<legk){
legk = hamilton[i];
name = "Hamilton";
}
if(verstappen[i]<legk){
legk = verstappen[i];
name = "Verstappen";
}
}
if(h_ossz < v_ossz) cout<<"Hamilton"<<endl;
else cout<<"Verstappen"<<endl;
cout<<name<<endl;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1868 KiB | ||||
2 | Accepted | 3ms | 2004 KiB | ||||
subtask2 | 10/10 | ||||||
3 | Accepted | 2ms | 2000 KiB | ||||
4 | Accepted | 2ms | 2004 KiB | ||||
5 | Accepted | 2ms | 2012 KiB | ||||
6 | Accepted | 2ms | 2016 KiB | ||||
subtask3 | 15/15 | ||||||
7 | Accepted | 3ms | 2148 KiB | ||||
8 | Accepted | 3ms | 2400 KiB | ||||
9 | Accepted | 3ms | 2704 KiB | ||||
10 | Accepted | 3ms | 2716 KiB | ||||
11 | Accepted | 3ms | 2852 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3068 KiB | ||||
13 | Accepted | 3ms | 3312 KiB | ||||
14 | Accepted | 3ms | 3400 KiB | ||||
15 | Accepted | 3ms | 3580 KiB | ||||
16 | Accepted | 3ms | 3796 KiB | ||||
17 | Accepted | 3ms | 3928 KiB | ||||
18 | Accepted | 3ms | 4044 KiB | ||||
19 | Accepted | 3ms | 4160 KiB | ||||
subtask5 | 55/55 | ||||||
20 | Accepted | 3ms | 4300 KiB | ||||
21 | Accepted | 3ms | 4380 KiB | ||||
22 | Accepted | 3ms | 4468 KiB | ||||
23 | Accepted | 3ms | 4468 KiB | ||||
24 | Accepted | 3ms | 4724 KiB | ||||
25 | Accepted | 3ms | 4808 KiB | ||||
26 | Accepted | 3ms | 4892 KiB | ||||
27 | Accepted | 3ms | 4912 KiB | ||||
28 | Accepted | 3ms | 5036 KiB |