40662023-03-13 07:30:38DragonoidOmegaNegáló rendezés (55 pont)cpp11Wrong answer 24/5535ms6188 KiB
#include <iostream>
#include <algorithm>

using namespace std;

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


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

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

        }
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base24/55
1Accepted0/03ms1752 KiB
2Wrong answer0/035ms3624 KiB
3Accepted2/23ms2196 KiB
4Wrong answer0/23ms2364 KiB
5Wrong answer0/23ms2596 KiB
6Accepted2/23ms2816 KiB
7Accepted3/33ms3184 KiB
8Accepted2/23ms3356 KiB
9Accepted3/34ms4776 KiB
10Wrong answer0/332ms4988 KiB
11Wrong answer0/335ms5080 KiB
12Accepted3/334ms3736 KiB
13Wrong answer0/332ms3824 KiB
14Wrong answer0/335ms5488 KiB
15Wrong answer0/335ms5696 KiB
16Accepted3/335ms5784 KiB
17Wrong answer0/334ms5784 KiB
18Accepted3/335ms5916 KiB
19Accepted3/335ms6020 KiB
20Wrong answer0/335ms6128 KiB
21Wrong answer0/332ms6188 KiB
22Wrong answer0/334ms6176 KiB