62782023-11-11 21:54:30aballaFormula-1cpp17Accepted 100/1003ms4700 KiB
#include <bits/stdc++.h>

int main(){
    std::vector<int> idoh, idov;
    int korok, cache;
    int v = 0, h = 0;
    int vmin = 1000000, hmin = 1000000;
    std::cin >> korok;
    for(int i = 0; i < korok; i++) {
        std::cin >> cache;
        idoh.push_back(cache);
        h += idoh[i];
        if (hmin > idoh[i]) {hmin = idoh[i];}
    }
    for(int i = 0; i < korok; i++) {
        std::cin >> cache;
        idov.push_back(cache);
        v += idov[i];
        if (vmin > idov[i]) {vmin = idov[i];}
    }
    if (v < h) {std::cout << "Verstappen\n";}
    else {std::cout << "Hamilton\n";}
    if (vmin < hmin) {std::cout << "Verstappen";}
    else {std::cout << "Hamilton";}
    std::cin >> h;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms2088 KiB
2Accepted3ms2140 KiB
subtask210/10
3Accepted3ms2292 KiB
4Accepted3ms2508 KiB
5Accepted3ms2752 KiB
6Accepted2ms2820 KiB
subtask315/15
7Accepted2ms2740 KiB
8Accepted3ms2836 KiB
9Accepted3ms3076 KiB
10Accepted3ms3324 KiB
11Accepted3ms3504 KiB
subtask420/20
12Accepted2ms3512 KiB
13Accepted2ms3640 KiB
14Accepted2ms3720 KiB
15Accepted3ms3852 KiB
16Accepted3ms4092 KiB
17Accepted3ms4268 KiB
18Accepted2ms4396 KiB
19Accepted2ms4392 KiB
subtask555/55
20Accepted3ms4488 KiB
21Accepted3ms4572 KiB
22Accepted3ms4572 KiB
23Accepted3ms4700 KiB
24Accepted3ms4568 KiB
25Accepted3ms4564 KiB
26Accepted3ms4564 KiB
27Accepted3ms4540 KiB
28Accepted3ms4648 KiB