摘要: Stage 1: Shenyang https://qoj.ac/contest/1096 A 只需要考虑每个 pair 的贡献即可,而相交的 pair 数量是线性的,因此可以暴力搞,剩下的不相交的 pair 拿前缀和做就行了,复杂度 \(\mathcal O(n\log n)\)。 corner 阅读全文
posted @ 2024-04-11 22:19 PetitSouris 阅读(246) 评论(0) 推荐(0)