Codeforces 🟣 CF626F. Group Projects
題目的難度顏色使用 Luogu 上的分級,由簡單到困難分別為 🔴🟠🟡🟢🔵🟣⚫。
🔗 🟣 CF626F. Group Projects
Problem Statement
題目簡述
有 個學生,每個學生完成工作的時間為 。需將學生分成若干組(可以一人一組)。
定義一個組的不平衡度 (imbalance) 為該組中最大的 減去最小的 。
求有多少種分組方式,使得所有組的不平衡度總和不超過 。
答案對 取模。
Constraints
約束條件
思路:動態規劃 (Open and Close Interval Trick)
本題和 CSES-1665 Coding Company 完全相同,請見 [解題紀錄]。
Code
1 | MOD = int(1e9 + 7) |
寫在最後
Cover Image Credit
The cover image was created by @崎白. All rights belong to the original artist.
It is used here only as a non-commercial cover illustration for this note. I do not claim ownership of the artwork.
If you are the copyright holder and believe this usage is inappropriate, please contact me by email or leave a comment. I will remove the image promptly.
本部落格所有文章除特別聲明外,均採用CC BY-NC-SA 4.0 授權協議。轉載請註明來源 十六個天亮!
評論
WalineGiscus





