242182026-02-06 20:47:58algoproNegáló rendezés (55 pont)pypy3Runtime error 22/5582ms32000 KiB
# UUID: 1c7e9f39-d0c4-4883-a225-d5931fb563ac
from sys import stdin
input = stdin.readline

mod = 10**9+7

def solv():
    N = int(input())
    A = list(map(int,input().split()))
    histogram = [0]*100001
    for a in A: histogram[a]+=1
    ans=1
    for j in range(100001): ans = (ans * (histogram[j] + 1)) % mod
    print(ans * pow(histogram[min(A)] + 1, -1, mod) % mod)

solv()
SubtaskSumTestVerdictTimeMemory
base22/55
1Accepted0/046ms22256 KiB
2Runtime error0/076ms32000 KiB
3Accepted2/252ms22224 KiB
4Accepted2/246ms22236 KiB
5Accepted2/257ms22248 KiB
6Accepted2/246ms22248 KiB
7Accepted3/346ms22248 KiB
8Accepted2/254ms22296 KiB
9Accepted3/350ms22456 KiB
10Accepted3/367ms31844 KiB
11Runtime error0/376ms32000 KiB
12Runtime error0/375ms32000 KiB
13Runtime error0/382ms32000 KiB
14Runtime error0/368ms32000 KiB
15Runtime error0/368ms32000 KiB
16Runtime error0/378ms32000 KiB
17Runtime error0/367ms32000 KiB
18Runtime error0/368ms32000 KiB
19Runtime error0/378ms32000 KiB
20Runtime error0/375ms32000 KiB
21Accepted3/378ms31984 KiB
22Runtime error0/376ms32000 KiB