242192026-02-06 20:49:08algoproNegáló rendezés (55 pont)pypy3Accepted 55/5579ms31976 KiB
# UUID: 792e088b-398b-4b2d-86bc-b1f4d143e444
from sys import stdin
input = stdin.readline

mod = 10**9+7

def solv():
    N = int(input())
    A = [int(x) for x in 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
base55/55
1Accepted0/046ms22448 KiB
2Accepted0/075ms31424 KiB
3Accepted2/246ms22220 KiB
4Accepted2/252ms22420 KiB
5Accepted2/246ms22216 KiB
6Accepted2/246ms22244 KiB
7Accepted3/354ms22288 KiB
8Accepted2/254ms22128 KiB
9Accepted3/350ms22504 KiB
10Accepted3/374ms30632 KiB
11Accepted3/376ms31436 KiB
12Accepted3/365ms31460 KiB
13Accepted3/379ms31612 KiB
14Accepted3/379ms31532 KiB
15Accepted3/367ms31348 KiB
16Accepted3/365ms31532 KiB
17Accepted3/367ms31468 KiB
18Accepted3/378ms30660 KiB
19Accepted3/375ms31976 KiB
20Accepted3/365ms31448 KiB
21Accepted3/374ms30800 KiB
22Accepted3/365ms31356 KiB