40712023-03-13 07:44:38DragonoidOmegaNegáló rendezés (55 pont)cpp11Wrong answer 0/553ms4176 KiB
//#include <iostream>
#include <fstream>
#include <algorithm>

using namespace std;

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

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;i<=maxi;++i)
    {
        if(x[i])
        {
            db=db*(x[i]+1);
            db=db%1000000007;

        }
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base0/55
1Wrong answer0/03ms1936 KiB
2Wrong answer0/03ms2336 KiB
3Wrong answer0/23ms2420 KiB
4Wrong answer0/23ms2640 KiB
5Wrong answer0/23ms2872 KiB
6Wrong answer0/23ms3028 KiB
7Wrong answer0/33ms3224 KiB
8Wrong answer0/23ms3344 KiB
9Wrong answer0/33ms3552 KiB
10Wrong answer0/33ms3532 KiB
11Wrong answer0/33ms3560 KiB
12Wrong answer0/33ms3636 KiB
13Wrong answer0/33ms3892 KiB
14Wrong answer0/33ms3856 KiB
15Wrong answer0/33ms3844 KiB
16Wrong answer0/33ms3972 KiB
17Wrong answer0/33ms4088 KiB
18Wrong answer0/33ms4176 KiB
19Wrong answer0/33ms4068 KiB
20Wrong answer0/33ms4068 KiB
21Wrong answer0/33ms4060 KiB
22Wrong answer0/33ms4068 KiB