40682023-03-13 07:34:12DragonoidOmegaNegáló rendezés (55 pont)cpp11Wrong answer 10/5535ms5912 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));

        }
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base10/55
1Accepted0/03ms1880 KiB
2Wrong answer0/035ms3616 KiB
3Accepted2/23ms2284 KiB
4Wrong answer0/23ms2500 KiB
5Wrong answer0/23ms2732 KiB
6Accepted2/23ms2944 KiB
7Accepted3/33ms3060 KiB
8Wrong answer0/23ms3396 KiB
9Wrong answer0/34ms4888 KiB
10Wrong answer0/332ms4976 KiB
11Wrong answer0/335ms5196 KiB
12Accepted3/335ms3644 KiB
13Wrong answer0/332ms3876 KiB
14Wrong answer0/335ms5400 KiB
15Wrong answer0/335ms5532 KiB
16Wrong answer0/335ms5612 KiB
17Wrong answer0/334ms5704 KiB
18Wrong answer0/335ms5700 KiB
19Wrong answer0/335ms5612 KiB
20Wrong answer0/335ms5740 KiB
21Wrong answer0/332ms5836 KiB
22Wrong answer0/335ms5912 KiB