40652023-03-13 07:29:57DragonoidOmegaNegáló rendezés (55 pont)cpp11Wrong answer 15/5535ms4716 KiB
#include <iostream>
#include <algorithm>

using namespace std;

int 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
base15/55
1Accepted0/03ms1748 KiB
2Wrong answer0/035ms2760 KiB
3Accepted2/23ms2204 KiB
4Wrong answer0/23ms2340 KiB
5Wrong answer0/23ms2688 KiB
6Accepted2/23ms2584 KiB
7Accepted3/33ms3000 KiB
8Accepted2/23ms2964 KiB
9Accepted3/34ms3700 KiB
10Wrong answer0/332ms3924 KiB
11Wrong answer0/335ms4124 KiB
12Accepted3/335ms3564 KiB
13Wrong answer0/332ms3632 KiB
14Wrong answer0/335ms4396 KiB
15Wrong answer0/334ms4396 KiB
16Wrong answer0/335ms4632 KiB
17Wrong answer0/332ms4608 KiB
18Wrong answer0/335ms4608 KiB
19Wrong answer0/335ms4612 KiB
20Wrong answer0/334ms4604 KiB
21Wrong answer0/332ms4716 KiB
22Wrong answer0/334ms4712 KiB