62002023-11-07 19:02:50GhostFormula-1cpp17Wrong answer 0/1003ms4628 KiB
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
    int n, i;
    cin >> n;

    vector<int> hamilton(n);
    vector<int> verstappen(n);
    for (i = 0; i < n; i++) {
        cin >> hamilton[i];
    }
    for (i = 0; i < n; i++) {
        cin >> verstappen[i];
    }

    int ham = 0, ver = 0;
    for (i = 0; i < n; i++) {
        ham += hamilton[i];
        ver += verstappen[i];
    }
    sort(hamilton.begin(), hamilton.end());
    sort(verstappen.begin(), verstappen.end());

    if (ham < ver) {
        cout << "Hamilton";
    }
    else {
        cout << "Verstappen";
    }
    if (hamilton[0] < verstappen[0]) {
        cout << "Hamilton";
    }
    else {
        cout << "Verstappen";
    }
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1688 KiB
2Wrong answer3ms1852 KiB
subtask20/10
3Wrong answer3ms2060 KiB
4Wrong answer3ms2176 KiB
5Wrong answer3ms2304 KiB
6Wrong answer3ms2512 KiB
subtask30/15
7Wrong answer3ms2696 KiB
8Wrong answer3ms2820 KiB
9Wrong answer2ms2892 KiB
10Wrong answer2ms2784 KiB
11Wrong answer3ms2908 KiB
subtask40/20
12Wrong answer3ms3152 KiB
13Wrong answer2ms3232 KiB
14Wrong answer3ms3328 KiB
15Wrong answer3ms3576 KiB
16Wrong answer3ms3796 KiB
17Wrong answer3ms4032 KiB
18Wrong answer3ms4120 KiB
19Wrong answer3ms4180 KiB
subtask50/55
20Wrong answer2ms4264 KiB
21Wrong answer3ms4384 KiB
22Wrong answer2ms4384 KiB
23Wrong answer3ms4384 KiB
24Wrong answer3ms4388 KiB
25Wrong answer3ms4508 KiB
26Wrong answer3ms4628 KiB
27Wrong answer3ms4484 KiB
28Wrong answer3ms4592 KiB