摘要: "Atcoder" description 给你$n$和$\{a_i\}$,你需要求所有满足$p_i\le a_i$的$1 n$排列的逆序对个数之和模$10^9+7$。 $n \le 2\times10^5$ sol 首先考虑一下所有满足要求的排列总数。记$cnt_i$表示有多少个$a_k\ge i 阅读全文
posted @ 2018-08-31 07:51 租酥雨 阅读(271) 评论(0) 推荐(0) 编辑