codeforces 501 D Misha and Permutations Summation (康托展开+康托逆展开+factorial_number_system+线段树×2)Sep 14, 2016·1195 words·3 minsACM Factorial Number System 康托展开 线段树题目链接 题意:给出两个排列,定义 ord(p) 为排列 p 的顺序(字典序从小到大),定义 perm(x) 为顺序为 x 的排列,现在要求 1 ≤ n ≤ 200 000