I - Ignatius and the Princess II

题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1027 题解: 第一个数代表着1到n的从小到大的数列,如果n=10,就代表{1,2,3,4,5,6,7,8,9,10}这样的数组,第二个数代表第k小的排列,最后输出就行了。比如{1,2,3,4} 第1小的数列是{1,2,3,4},第二小的数列是{1,2,4,3},方法有两个: 1. 使用next_pe
相关文章
相关标签/搜索