77112024-01-10 14:26:06adamNegáló rendezés (55 pont)cpp17Accepted 55/5581ms15180 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    long long count = 0;
    cin >> count;
    long long lowest = 2e9+7;
    map<long long, long long> quantity;
    for (long long i = 0; i < count; i++) {
        long long num;
        cin >> num;
        if (num < lowest) lowest = num;
        quantity[num]++;
    }
    long long solution = 1;
    for (pair<long long, long long> num : quantity) {
        if (num.first == lowest) continue;
        solution *= num.second+1;
        solution = solution % 1000000007;
    }

    cout << solution << endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base55/55
1Accepted0/03ms1812 KiB
2Accepted0/063ms6812 KiB
3Accepted2/23ms2580 KiB
4Accepted2/23ms2660 KiB
5Accepted2/23ms2760 KiB
6Accepted2/23ms2568 KiB
7Accepted3/33ms2648 KiB
8Accepted2/23ms2760 KiB
9Accepted3/33ms2848 KiB
10Accepted3/372ms14032 KiB
11Accepted3/381ms15180 KiB
12Accepted3/335ms2812 KiB
13Accepted3/332ms2896 KiB
14Accepted3/352ms5680 KiB
15Accepted3/345ms3248 KiB
16Accepted3/363ms7744 KiB
17Accepted3/361ms8292 KiB
18Accepted3/348ms4560 KiB
19Accepted3/361ms7832 KiB
20Accepted3/354ms6032 KiB
21Accepted3/346ms4688 KiB
22Accepted3/341ms3584 KiB