40722023-03-13 07:48:08DragonoidOmegaNegáló rendezés (55 pont)cpp11Accepted 55/5535ms6292 KiB
#include <iostream>
//#include <fstream>
#include <algorithm>

using namespace std;

//ifstream cin("be2.txt");
//ofstream cout("rend.out");

long long x[100001],db,a,n,i,maxi,mini=100001;


int main()
{
    cin>>n;
    for(i=1;i<=n;++i)
    {
        cin>>a;
        ++x[a];
        mini=min(mini,a);
        maxi=max(maxi,a);
    }


    db=1;
    for(i=mini+1;i<=maxi;++i)
    {
        if(x[i])
        {
            db=db*(x[i]+1);
            db=db%1000000007;

        }
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base55/55
1Accepted0/03ms1888 KiB
2Accepted0/035ms3620 KiB
3Accepted2/23ms2284 KiB
4Accepted2/23ms2504 KiB
5Accepted2/23ms2584 KiB
6Accepted2/23ms2592 KiB
7Accepted3/33ms2828 KiB
8Accepted2/23ms3144 KiB
9Accepted3/34ms4668 KiB
10Accepted3/332ms4884 KiB
11Accepted3/335ms5096 KiB
12Accepted3/335ms3644 KiB
13Accepted3/332ms3552 KiB
14Accepted3/335ms5212 KiB
15Accepted3/335ms5424 KiB
16Accepted3/335ms5504 KiB
17Accepted3/334ms5740 KiB
18Accepted3/335ms5816 KiB
19Accepted3/335ms6092 KiB
20Accepted3/335ms6176 KiB
21Accepted3/332ms6084 KiB
22Accepted3/335ms6292 KiB