Submission #939303

#TimeUsernameProblemLanguageResultExecution timeMemory
939303blackavarMagneti (COCI21_magneti)Cpython 3
0 / 110
13 ms2972 KiB
MOD = 10**9 + 7 n, l = map(int, input().split()) radii = list(map(int, input().split())) dp = [0] * (n + 1) dp[0] = 1 for i in range(1, n + 1): dp[i] = dp[i - 1] * (l - sum(max(0, radii[i - 1] - radii[j - 1]) for j in range(1, i)) % MOD) % MOD print(dp[n])
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...