摘要: 杭电1027 IgnatiusAndhe Princess II是一个全排列,解题使用到数学知识 字典序,详细解释例子在我的 文件 里的《字典序》,可以直接用调用函数库里的next_permutation(),其头文件是<algorithm>代码如下:#include<iostream>using namespace std; #include<algorithm>int main() { int arr[1001]; int n,m,i; while(scanf("%d%d",&n,&m) != EOF) { for(i 阅读全文
posted @ 2012-04-07 19:58 南柯南 阅读(525) 评论(2) 推荐(0) 编辑