78662024-01-11 14:13:09BotiFormula-1cpp17Accepted 100/1003ms4012 KiB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<int> h (n);
    int v;
    int min = 100000;
    string min1 = "Hamilton";
    int ossz = 0;
    for (int i = 0; i < n; i++)
    {
        cin >> h[i];
        if (h[i] < min)
        {
            min = h[i];
        }
    }
    for (int i = 0; i < n; i++)
    {
        cin >> v;
        if (v < min)
        {
            min = v;
            min1 = "Verstappen";
        }
        ossz += v - h[i];
    }
    if (ossz < 0)
    {
        cout << "Verstappen";
    }
    else
    {
        cout << "Hamilton";
    }
    cout << endl << min1;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1812 KiB
2Accepted3ms2008 KiB
subtask210/10
3Accepted3ms2220 KiB
4Accepted3ms2468 KiB
5Accepted3ms2528 KiB
6Accepted3ms2772 KiB
subtask315/15
7Accepted3ms2900 KiB
8Accepted2ms2992 KiB
9Accepted3ms3124 KiB
10Accepted3ms3180 KiB
11Accepted3ms3312 KiB
subtask420/20
12Accepted3ms3524 KiB
13Accepted3ms3640 KiB
14Accepted3ms3752 KiB
15Accepted3ms3832 KiB
16Accepted3ms3860 KiB
17Accepted3ms3852 KiB
18Accepted3ms3860 KiB
19Accepted2ms3852 KiB
subtask555/55
20Accepted3ms3856 KiB
21Accepted3ms4004 KiB
22Accepted3ms3868 KiB
23Accepted3ms3880 KiB
24Accepted3ms3880 KiB
25Accepted3ms3876 KiB
26Accepted3ms3884 KiB
27Accepted3ms3884 KiB
28Accepted3ms4012 KiB