Submission #379367

#TimeUsernameProblemLanguageResultExecution timeMemory
37936754skyxenonA Huge Tower (CEOI10_tower)Cpython 3
90 / 100
1095 ms78996 KiB
# https://oj.uz/problem/view/CEOI10_tower # Credits: https://usaco.guide/solutions/ceoi-10-tower?lang=cpp n, d = map(int, input().split()) blocks = sorted(map(int, input().split())) ans = 1 r = 0 for l in range(n): while r < n - 1 and blocks[l] + d >= blocks[r + 1]: r += 1 ans *= r - l + 1 print(ans % 1000000009)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...