98702024-03-13 17:17:49VargusFormula-1cpp17Wrong answer 0/1003ms4448 KiB
#include <iostream>
#include <queue>
#include <algorithm>
#define ll long long

using namespace std;

ll atlham, atlver;
int main()
{
    ll n;
    cin >> n;
    vector <ll> ham(n + 1), ver(n+1);
    for (ll i = 1; i <= n; ++i)
    {
        cin >> ham[i];
        atlham += ham[i];
    }
    
    for (ll i = 1; i <= n; ++i)
    {
        cin >> ver[i];
        atlver += ver[i];
    }

    sort(ham.begin(), ham.end());
    sort(ver.begin(), ver.end());

    if (atlver < atlham)
        cout << "Verstappen\n";
    else
        cout << "Hamilton\n";
    if(ver[0] < ham[0])
        cout << "Verstappen";
    else
        cout << "Hamilton";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1812 KiB
2Accepted3ms2004 KiB
subtask20/10
3Accepted3ms2244 KiB
4Wrong answer3ms2492 KiB
5Accepted3ms2804 KiB
6Wrong answer3ms3048 KiB
subtask30/15
7Wrong answer2ms3012 KiB
8Accepted3ms3064 KiB
9Wrong answer3ms3312 KiB
10Accepted3ms3316 KiB
11Wrong answer3ms3404 KiB
subtask40/20
12Wrong answer3ms3500 KiB
13Accepted2ms3584 KiB
14Accepted3ms3824 KiB
15Accepted3ms3916 KiB
16Wrong answer3ms4024 KiB
17Wrong answer3ms4024 KiB
18Wrong answer3ms3916 KiB
19Wrong answer3ms4044 KiB
subtask50/55
20Accepted3ms4008 KiB
21Wrong answer3ms4132 KiB
22Accepted3ms4256 KiB
23Wrong answer3ms4344 KiB
24Accepted3ms4336 KiB
25Wrong answer3ms4448 KiB
26Accepted3ms4340 KiB
27Accepted3ms4224 KiB
28Wrong answer3ms4220 KiB