63062023-11-15 16:24:32toki32Formula-1cpp17Accepted 100/1003ms4732 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
3Accepted3ms2316 KiB
4Accepted2ms2396 KiB
5Accepted3ms2520 KiB
6Accepted3ms2772 KiB
subtask315/15
7Accepted3ms2988 KiB
8Accepted3ms3164 KiB
9Accepted3ms3400 KiB
10Accepted3ms3616 KiB
11Accepted3ms3700 KiB
subtask420/20
12Accepted3ms3948 KiB
13Accepted3ms3908 KiB
14Accepted3ms3980 KiB
15Accepted3ms3960 KiB
16Accepted3ms3956 KiB
17Accepted3ms3968 KiB
18Accepted3ms3972 KiB
19Accepted3ms3848 KiB
subtask555/55
20Accepted3ms3976 KiB
21Accepted3ms4220 KiB
22Accepted3ms4304 KiB
23Accepted3ms4428 KiB
24Accepted3ms4512 KiB
25Accepted3ms4608 KiB
26Accepted3ms4604 KiB
27Accepted3ms4604 KiB
28Accepted3ms4732 KiB