70192023-12-26 22:38:13kukkermanNegáló rendezés (55 pont)cpp11Accepted 55/5552ms13600 KiB
#include <iostream>
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <cstdint>

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

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

    return v;
}

void feldolgoz(const std::vector<int> &v) {
    const auto min = *std::min_element(v.cbegin(), v.cend());

    std::unordered_map<int, uint64_t> db;
    for (auto x: v) {
        db[x]++;
    }

    uint64_t c = 1;
    for (const auto &p : db) {
        if (p.first != min) {
            c = (c * (p.second + 1)) % 1000000007ULL;
        }
    }

    std::cout << c << std::endl;
}

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

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base55/55
1Accepted0/03ms1812 KiB
2Accepted0/043ms5932 KiB
3Accepted2/23ms2228 KiB
4Accepted2/23ms2440 KiB
5Accepted2/23ms2800 KiB
6Accepted2/23ms2840 KiB
7Accepted3/33ms3048 KiB
8Accepted2/23ms3164 KiB
9Accepted3/33ms3344 KiB
10Accepted3/348ms13452 KiB
11Accepted3/352ms13600 KiB
12Accepted3/337ms4196 KiB
13Accepted3/335ms4660 KiB
14Accepted3/341ms6340 KiB
15Accepted3/337ms4912 KiB
16Accepted3/343ms8068 KiB
17Accepted3/343ms9832 KiB
18Accepted3/339ms6368 KiB
19Accepted3/343ms8024 KiB
20Accepted3/341ms7580 KiB
21Accepted3/335ms5784 KiB
22Accepted3/337ms5392 KiB