242202026-02-06 20:50:16algoproNegáló rendezés (55 pont)pypy3Accepted 55/5579ms31984 KiB
# UUID: 64154307-741a-4b5c-bebe-c684b8b0a8d3
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/046ms22256 KiB
2Accepted0/076ms31924 KiB
3Accepted2/252ms22220 KiB
4Accepted2/246ms22216 KiB
5Accepted2/254ms22164 KiB
6Accepted2/254ms22324 KiB
7Accepted3/348ms22272 KiB
8Accepted2/246ms22272 KiB
9Accepted3/359ms22504 KiB
10Accepted3/365ms30944 KiB
11Accepted3/365ms31976 KiB
12Accepted3/375ms31984 KiB
13Accepted3/379ms31904 KiB
14Accepted3/367ms31904 KiB
15Accepted3/365ms31892 KiB
16Accepted3/375ms31932 KiB
17Accepted3/368ms31840 KiB
18Accepted3/378ms31980 KiB
19Accepted3/367ms31880 KiB
20Accepted3/375ms31984 KiB
21Accepted3/372ms30924 KiB
22Accepted3/367ms31948 KiB