摘要: 如果一个字符串不包含相邻的重复字符子串,就叫做困难的串输入n,l, 输出由前l个字符组成,字典序排第k的串。 1 #include 2 #include 3 using namespace std; 4 int cnt,n,l; 5 int A[10000]; 6 int dfs(int cur) 7 { 8 if(cnt++==n) //到第n个 ,输出串 ,返回0 9 {10 for (int i = 0; i < cur; ++i)11 printf("%c", A[i]);12 printf("\n");13 ... 阅读全文
posted @ 2014-01-23 21:17 Yuer~ 阅读(319) 评论(0) 推荐(0) 编辑