40702023-03-13 07:41:15DragonoidOmegaNegáló rendezés (55 pont)cpp11Wrong answer 24/5535ms5776 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);
            db=db%1000000007;

        }
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base24/55
1Accepted0/03ms1884 KiB
2Wrong answer0/035ms3660 KiB
3Accepted2/23ms2604 KiB
4Wrong answer0/23ms2572 KiB
5Wrong answer0/23ms2664 KiB
6Accepted2/23ms2996 KiB
7Accepted3/33ms2976 KiB
8Accepted2/23ms3344 KiB
9Accepted3/34ms4828 KiB
10Wrong answer0/334ms4732 KiB
11Wrong answer0/335ms4952 KiB
12Accepted3/334ms3412 KiB
13Wrong answer0/332ms3640 KiB
14Wrong answer0/335ms5176 KiB
15Wrong answer0/334ms5140 KiB
16Accepted3/335ms5236 KiB
17Wrong answer0/334ms5228 KiB
18Accepted3/335ms5260 KiB
19Accepted3/335ms5336 KiB
20Wrong answer0/334ms5612 KiB
21Wrong answer0/332ms5572 KiB
22Wrong answer0/335ms5776 KiB