57152023-09-09 19:46:12kukkermanAranycipők (45)cpp14Accepted 45/454ms4432 KiB
#include <iostream>
#include <vector>
#include <algorithm>

std::vector<int> beolvas(std::istream &in) {
    std::size_t n;
    in >> n;

    std::vector<int> v(n);
    for (auto i = 0u; i < n; i++) {
        in >> v[i];
    }

    return v;
}

void feldolgoz(const std::vector<int> &v) {
    const auto max_gol = *std::max_element(v.cbegin(), v.cend());
    const auto aranycipok = std::count(v.cbegin(), v.cend(), max_gol);

    std::cout << max_gol << std::endl;
    std::cout << aranycipok << std::endl;

    const auto n = v.size();
    for (auto i = 0u; i < n; i++) {
        if (v[i] == max_gol) {
            std::cout << i + 1 << std::endl;
        }
    }
}

int main() {
    const auto v = beolvas(std::cin);
    feldolgoz(v);

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base45/45
1Accepted0/03ms1808 KiB
2Accepted0/03ms2064 KiB
3Accepted3/33ms2300 KiB
4Accepted3/32ms2452 KiB
5Accepted3/32ms2644 KiB
6Accepted3/33ms2856 KiB
7Accepted3/33ms3060 KiB
8Accepted3/33ms3280 KiB
9Accepted3/32ms3488 KiB
10Accepted3/33ms3600 KiB
11Accepted3/33ms3800 KiB
12Accepted3/32ms3884 KiB
13Accepted3/33ms4016 KiB
14Accepted3/33ms4092 KiB
15Accepted3/33ms4224 KiB
16Accepted3/33ms4308 KiB
17Accepted3/34ms4432 KiB