79542024-01-12 08:44:00csaron71Negáló rendezés (55 pont)cpp17Accepted 55/5541ms5724 KiB
#include <bits/stdc++.h>

using namespace std;


vector<long long> szamok(100001, 1);
long long nagy=1000000007;

int main()
{
    long long n;
    cin >> n;
    long long mini=100001;
    for (long long i=0; i<n; i++) {
        long long x;
        cin >> x;
        szamok[x]++;
        mini=min(mini, x);
    }

    long long vege=1;
    for (long long i=mini+1; i<100001; i++) {
            vege*=szamok[i]%nagy;
            vege%=nagy;
    }
    cout << vege << "\n";
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base55/55
1Accepted0/06ms3168 KiB
2Accepted0/039ms3356 KiB
3Accepted2/26ms3624 KiB
4Accepted2/26ms3828 KiB
5Accepted2/26ms4036 KiB
6Accepted2/26ms4124 KiB
7Accepted3/36ms4216 KiB
8Accepted2/26ms4300 KiB
9Accepted3/36ms4424 KiB
10Accepted3/337ms4636 KiB
11Accepted3/339ms4852 KiB
12Accepted3/339ms4936 KiB
13Accepted3/337ms5020 KiB
14Accepted3/339ms5148 KiB
15Accepted3/339ms5144 KiB
16Accepted3/339ms5272 KiB
17Accepted3/337ms5368 KiB
18Accepted3/341ms5500 KiB
19Accepted3/339ms5576 KiB
20Accepted3/339ms5572 KiB
21Accepted3/335ms5580 KiB
22Accepted3/339ms5724 KiB