68242023-12-19 10:40:35turitamasFormula-1cpp17Accepted 100/1003ms4656 KiB
#include <iostream>

using namespace std;

int main()
{
    int h, v, n, ho=0, vo=0, fast=100001, cv=0, ch=0;

    cin>>n;
    for(int i=0; i<n; i++)
    {
        cin>>h;
        ho+=h;
        if(h<fast)
        {
            fast=h;
            ch=1;
        }
    }
    for(int i=0; i<n; i++)
    {
        cin>>v;
        vo+=v;
        if(v<fast)
        {
            fast=v;
            cv=1;
            ch=0;
        }
    }

    if(ho<vo)
    {
        cout<<"Hamilton";
    }
    else if(vo<ho)
    {
        cout<<"Verstappen";
    }
    if(cv==1)
    {
        cout<<endl;
        cout<<"Verstappen";
    }
    else if(ch==1)
    {
        cout<<endl;
        cout<<"Hamilton";
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2120 KiB
subtask210/10
3Accepted3ms2200 KiB
4Accepted3ms2328 KiB
5Accepted3ms2544 KiB
6Accepted3ms2624 KiB
subtask315/15
7Accepted3ms2756 KiB
8Accepted3ms2840 KiB
9Accepted3ms2816 KiB
10Accepted3ms2800 KiB
11Accepted3ms2788 KiB
subtask420/20
12Accepted3ms2908 KiB
13Accepted3ms3032 KiB
14Accepted3ms3156 KiB
15Accepted3ms3152 KiB
16Accepted3ms3388 KiB
17Accepted3ms3392 KiB
18Accepted3ms3488 KiB
19Accepted3ms3572 KiB
subtask555/55
20Accepted3ms3820 KiB
21Accepted3ms4032 KiB
22Accepted3ms4116 KiB
23Accepted3ms4108 KiB
24Accepted3ms4364 KiB
25Accepted3ms4568 KiB
26Accepted3ms4656 KiB
27Accepted3ms4576 KiB
28Accepted3ms4652 KiB