Submission #939303

# Submission time Handle Problem Language Result Execution time Memory
939303 2024-03-06T08:37:54 Z blackavar Magneti (COCI21_magneti) Python 3
0 / 110
13 ms 2972 KB
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 time Memory Grader output
1 Incorrect 11 ms 2908 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 2972 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 2908 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 2908 KB Output isn't correct
2 Halted 0 ms 0 KB -