74222024-01-08 19:47:39szasztundeNegáló rendezés (55 pont)cpp17Accepted 55/5585ms15276 KiB
#include <iostream>
#include <map>
using namespace std;

map <int,long long> a;


int main()
{
    long long x,n,mn=100001;

    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>x;
        a[x]++;
        if(x<mn) mn=x;
    }
    long long db=1;
    map<int,long long>::iterator it;
    for(it=a.begin();it!=a.end();it++)
    {
        if(it->first!=mn)
        {
            db=db*(it->second+1);
            db=db%1000000007;
        }
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base55/55
1Accepted0/03ms1876 KiB
2Accepted0/063ms6920 KiB
3Accepted2/23ms2332 KiB
4Accepted2/23ms2400 KiB
5Accepted2/23ms2492 KiB
6Accepted2/23ms2576 KiB
7Accepted3/33ms2572 KiB
8Accepted2/23ms2704 KiB
9Accepted3/33ms2992 KiB
10Accepted3/372ms14148 KiB
11Accepted3/385ms15276 KiB
12Accepted3/335ms3012 KiB
13Accepted3/332ms3132 KiB
14Accepted3/352ms5548 KiB
15Accepted3/345ms3216 KiB
16Accepted3/363ms7776 KiB
17Accepted3/361ms8324 KiB
18Accepted3/348ms4444 KiB
19Accepted3/363ms7668 KiB
20Accepted3/354ms6076 KiB
21Accepted3/346ms4416 KiB
22Accepted3/341ms3400 KiB