摘要: AGC 023E Solution 首先考虑如何计算排列$p$的个数,设$cnt[i]$表示$a_j\geq i$的个数,那么满足条件的排列$p$的总数$tot$就是$tot=\prod cnt[i]−(n−i)$,这是因为考虑从$n$开始填数,对于每个数字$i$,它一共有$cnt[i]$个位置可以 阅读全文
posted @ 2020-12-21 09:13 关怀他人 阅读(189) 评论(0) 推荐(0)