40672023-03-13 07:32:28DragonoidOmegaNegáló rendezés (55 pont)cpp11Wrong answer 24/5535ms6120 KiB
#include <iostream>
#include <algorithm>

using namespace std;

long long x[1000001],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/03ms2032 KiB
2Wrong answer0/035ms3708 KiB
3Accepted2/23ms2376 KiB
4Wrong answer0/23ms2596 KiB
5Wrong answer0/23ms2688 KiB
6Accepted2/23ms2684 KiB
7Accepted3/33ms2848 KiB
8Accepted2/23ms3144 KiB
9Accepted3/34ms4504 KiB
10Wrong answer0/332ms4700 KiB
11Wrong answer0/335ms4780 KiB
12Accepted3/334ms3352 KiB
13Wrong answer0/332ms3572 KiB
14Wrong answer0/335ms5188 KiB
15Wrong answer0/334ms5320 KiB
16Accepted3/335ms5532 KiB
17Wrong answer0/332ms5620 KiB
18Accepted3/335ms5744 KiB
19Accepted3/335ms6120 KiB
20Wrong answer0/335ms5956 KiB
21Wrong answer0/332ms6020 KiB
22Wrong answer0/335ms6004 KiB