摘要: #include<iostream> #include<vector> using namespace std; #define LL long long const int N = 1010; // f(i) 表示以i为开始,能够得到的满足性质的数的个数 // f(i) = 1 + f(k), k 阅读全文
posted @ 2020-10-07 19:56 yys_c 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 先按照题目提示把回文数搞出来,然后挨个判断素数即可。 #include<iostream> #include<set> using namespace std; set<int> s; int a[10]; int m, n; int check(int t){ for(int i = 2; i < 阅读全文
posted @ 2020-10-07 14:05 yys_c 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 题意:从全排列的某一个排列开始向后继续搜索m个,输出这个排列后面的第m个排列 思路:先根据开始的状态,先模拟去搜索一遍,然后通过递归回溯,接着去搜下面的状态。 #include<iostream> #include<vector> using namespace std; const int N = 阅读全文
posted @ 2020-10-07 11:14 yys_c 阅读(124) 评论(0) 推荐(0) 编辑