60132023-10-22 16:16:00BoldiFormula-1cpp17Accepted 100/1003ms4752 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, hmin=1000000, hcnt=0, vcnt=0; cin>>n;
    for(int i=0;i<n;i++){
        int x; cin>>x;
        hcnt+=x;
        if(x<hmin) hmin=x;
    }
    bool b=true;
    for(int i=0;i<n;i++){
        int x; cin>>x;
        vcnt+=x;
        if(x<hmin)b=false;
    }
    if(hcnt<vcnt) cout<<"Hamilton"<<endl;
    else cout<<"Verstappen"<<endl;
    if(b) cout<<"Hamilton";
    else cout<<"Verstappen";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1872 KiB
2Accepted3ms2076 KiB
subtask210/10
3Accepted2ms2156 KiB
4Accepted3ms2296 KiB
5Accepted2ms2380 KiB
6Accepted3ms2624 KiB
subtask315/15
7Accepted2ms2708 KiB
8Accepted2ms2852 KiB
9Accepted3ms3004 KiB
10Accepted3ms3188 KiB
11Accepted3ms3404 KiB
subtask420/20
12Accepted3ms3620 KiB
13Accepted3ms3708 KiB
14Accepted3ms3952 KiB
15Accepted3ms4116 KiB
16Accepted3ms4112 KiB
17Accepted3ms4216 KiB
18Accepted2ms4328 KiB
19Accepted3ms4448 KiB
subtask555/55
20Accepted3ms4456 KiB
21Accepted3ms4376 KiB
22Accepted3ms4380 KiB
23Accepted3ms4388 KiB
24Accepted3ms4384 KiB
25Accepted3ms4392 KiB
26Accepted3ms4632 KiB
27Accepted3ms4752 KiB
28Accepted3ms4748 KiB