摘要: P1036 选书 ps:dfs //递归写全排列,直接判断素数 //递归是形式,用递归实现dfs ,暴搜 //递归边界条件用来剪枝 #include<iostream> using namespace std; #include<cmath> bool is_prime(int x){ for(in 阅读全文
posted @ 2018-07-30 22:02 SUMay 阅读(133) 评论(0) 推荐(0) 编辑
摘要: P1035 1 //要记得加括号哦啊 2 #include<iostream> 3 using namespace std; 4 double sn; 5 int k; 6 int main(){ 7 cin>>k; 8 sn=1; 9 int i=1; 10 while(sn <= k){ 11 阅读全文
posted @ 2018-07-30 22:02 SUMay 阅读(116) 评论(0) 推荐(0) 编辑