摘要: T1 注意到相同做法的题目,考虑对深度势能法。 T2 注意到可以从大到小贪心,维护 \(nd\),\(cnt_p\),表示构造出当前答案的需求量,\(p\) 在前缀中的出现数量。 对于 \(cnt_p < nd\),则 \(nd = nd - cnt_p\)。 对于 \(nd \leq nd\),则 阅读全文
posted @ 2025-11-22 14:38 liheyang 阅读(4) 评论(0) 推荐(0)