摘要:
#include<iostream> #include<vector> using namespace std; #define LL long long const int N = 1010; // f(i) 表示以i为开始,能够得到的满足性质的数的个数 // f(i) = 1 + f(k), k 阅读全文
摘要:
先按照题目提示把回文数搞出来,然后挨个判断素数即可。 #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 < 阅读全文
摘要:
题意:从全排列的某一个排列开始向后继续搜索m个,输出这个排列后面的第m个排列 思路:先根据开始的状态,先模拟去搜索一遍,然后通过递归回溯,接着去搜下面的状态。 #include<iostream> #include<vector> using namespace std; const int N = 阅读全文