74162024-01-08 19:06:53szasztundeNegáló rendezés (55 pont)cpp17Wrong answer 25/5535ms4800 KiB
#include <iostream>
using namespace std;

int a[100001]={0};


int main()
{
    int x,n,mx=0,mn=100001;
    cin>>n;
    for(int i=1;i<=n;++i)
    {
        cin>>x;
        a[x]++;
        if(x<mn) mn=x;
        if(x>mx) mx=x;
    }
    int db=1;
    for(int i=mn+1;i<=mx;i++)
    {
        if(a[i]>0)
        {
            db=db*(a[i]+1);
            db=db%1000000007;

        }
    }
    cout<<db;
}
SubtaskSumTestVerdictTimeMemory
base25/55
1Accepted0/03ms1880 KiB
2Wrong answer0/035ms2752 KiB
3Accepted2/23ms2192 KiB
4Accepted2/23ms2412 KiB
5Accepted2/23ms2644 KiB
6Accepted2/23ms2840 KiB
7Accepted3/33ms2940 KiB
8Accepted2/23ms3276 KiB
9Accepted3/34ms4220 KiB
10Accepted3/332ms4260 KiB
11Accepted3/335ms4504 KiB
12Accepted3/334ms3800 KiB
13Wrong answer0/332ms4064 KiB
14Wrong answer0/335ms4800 KiB
15Wrong answer0/334ms4488 KiB
16Wrong answer0/335ms4488 KiB
17Wrong answer0/332ms4492 KiB
18Wrong answer0/335ms4488 KiB
19Wrong answer0/335ms4492 KiB
20Wrong answer0/334ms4600 KiB
21Wrong answer0/330ms4624 KiB
22Wrong answer0/334ms4644 KiB