next_permutation ( ) : HDU-1027 Ignatius and the Princess II 和 HDU-1716 排列2
HDU-1027 Ignatius and the Princess IIHDU-1027 Ignatius and the Princess II题意给出 n,m,求出从 1 - n 的第 m 小的序列。thinking利用 STL 里的求下一个排列组合的函数 next_permutation()。next_permutation()求出一个序列字典序的下一个,排序范围是 [ first, last ).code#include <iostream>#include <
原创
2020-11-09 22:34:27 ·
92 阅读 ·
0 评论