62982023-11-13 21:09:48gkataFormula-1cpp17Accepted 100/1003ms4756 KiB
#include <iostream>

using namespace std;

bool ok=false;
int n,a,i,h,v,m=100001;

int main()
{
    cin>>n;
    for(i=1;i<=n;++i)
    {
        cin>>a;
        h+=a;
        if(a<m) m=a;
    }

    for(i=1;i<=n;++i)
    {
        cin>>a;
        v+=a;
        if(a<m)
        {
            m=a;
            ok=true;
        }
    }

    if(h<v) cout<<"Hamilton"<<"\n";
        else cout<<"Verstappen"<<"\n";

    if(ok) cout<<"Verstappen";
        else cout<<"Hamilton";


    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2072 KiB
subtask210/10
3Accepted3ms2280 KiB
4Accepted2ms2520 KiB
5Accepted2ms2604 KiB
6Accepted3ms2860 KiB
subtask315/15
7Accepted3ms3044 KiB
8Accepted3ms3128 KiB
9Accepted3ms3340 KiB
10Accepted3ms3424 KiB
11Accepted3ms3556 KiB
subtask420/20
12Accepted3ms3760 KiB
13Accepted3ms3884 KiB
14Accepted2ms3996 KiB
15Accepted3ms4084 KiB
16Accepted3ms4100 KiB
17Accepted2ms4176 KiB
18Accepted3ms4308 KiB
19Accepted3ms4428 KiB
subtask555/55
20Accepted3ms4520 KiB
21Accepted3ms4592 KiB
22Accepted3ms4488 KiB
23Accepted3ms4592 KiB
24Accepted3ms4600 KiB
25Accepted3ms4480 KiB
26Accepted3ms4488 KiB
27Accepted3ms4756 KiB
28Accepted3ms4664 KiB