63202023-11-15 16:59:34Pbg4444Formula-1cpp17Accepted 100/1003ms4340 KiB
#include <bits/stdc++.h>

int main() {
    int n = 0;
    std::cin >> n;
    int ham_sum = 0;
    int ver_sum = 0;
    int ham_min = INT_MAX;
    int ver_min = INT_MAX;

    for (int i = 0; i < n; i++) {
        int x;
        std::cin >> x;
        ham_sum += x;
        ham_min = x < ham_min ? x : ham_min;
    }
    for (int i = 0; i < n; i++) {
        int x;
        std::cin >> x;
        ver_sum += x;
        ver_min = x < ver_min ? x : ver_min;
    }
    if (ham_sum < ver_sum) std::cout << "Hamilton\n";
    else std::cout << "Verstappen\n";
    if (ham_min < ver_min) std::cout << "Hamilton\n";
    else std::cout << "Verstappen\n";
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2116 KiB
subtask210/10
3Accepted3ms2360 KiB
4Accepted3ms2608 KiB
5Accepted3ms2628 KiB
6Accepted3ms2604 KiB
subtask315/15
7Accepted2ms2672 KiB
8Accepted2ms2672 KiB
9Accepted3ms2920 KiB
10Accepted3ms3132 KiB
11Accepted3ms3228 KiB
subtask420/20
12Accepted3ms3440 KiB
13Accepted2ms3520 KiB
14Accepted2ms3648 KiB
15Accepted3ms3768 KiB
16Accepted3ms3896 KiB
17Accepted2ms3984 KiB
18Accepted2ms3948 KiB
19Accepted3ms4192 KiB
subtask555/55
20Accepted3ms4212 KiB
21Accepted2ms4212 KiB
22Accepted3ms4212 KiB
23Accepted3ms4340 KiB
24Accepted3ms4212 KiB
25Accepted3ms4280 KiB
26Accepted3ms4172 KiB
27Accepted3ms4172 KiB
28Accepted2ms4172 KiB