68292023-12-19 10:45:50HunMartin23Formula-1cpp17Accepted 100/1003ms5056 KiB
#include <iostream>

using namespace std;

int main()
{
    int N,osz=0,osz1=0,leg=10000000000000,leg1=100000000000000000000;
    cin>>N;
    int V[N],H[N];
    for (int i=1;i<=N;i++)
    {
        cin>>H[i];
        if (H[i]<leg)
        {
            leg=H[i];
        }
        osz+=H[i];
    }
    for (int i=1;i<=N;i++)
    {
        cin>>V[i];
        if (V[i]<leg)
        {
            leg1=V[i];
        }
        osz1+=V[i];
    }
    if (osz<osz1)
    {
        cout<<"Hamilton"<<endl;
    }
    else if (osz1<osz)
    {
        cout<<"Verstappen"<<endl;
    }
    if (leg<leg1)
    {
        cout<<"Hamilton";
    }
    else if (leg1<leg)
    {
        cout<<"Verstappen";
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2124 KiB
subtask210/10
3Accepted3ms2332 KiB
4Accepted3ms2540 KiB
5Accepted3ms2792 KiB
6Accepted3ms2968 KiB
subtask315/15
7Accepted3ms3124 KiB
8Accepted3ms3252 KiB
9Accepted3ms3484 KiB
10Accepted3ms3664 KiB
11Accepted3ms3756 KiB
subtask420/20
12Accepted3ms3860 KiB
13Accepted3ms3744 KiB
14Accepted3ms3660 KiB
15Accepted3ms3648 KiB
16Accepted3ms3768 KiB
17Accepted3ms3844 KiB
18Accepted3ms4092 KiB
19Accepted3ms4188 KiB
subtask555/55
20Accepted3ms4272 KiB
21Accepted3ms4276 KiB
22Accepted3ms4276 KiB
23Accepted3ms4272 KiB
24Accepted3ms4276 KiB
25Accepted3ms4400 KiB
26Accepted3ms4616 KiB
27Accepted3ms4824 KiB
28Accepted3ms5056 KiB