![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
蓝桥杯
小耗子001
得到的和得不到的都是收获
展开
-
实用性原则 暴力破解猜年龄
年龄的三次方为4位数字,四次方为6位数字,全部的10个数字为0~9;#include <iostream>#include <stdio.h> #include <cstring>#include <stdlib.h>using namespace std;int isdiff(char *a){ int len=strlen(a); for(int...原创 2018-03-29 20:48:00 · 257 阅读 · 0 评论 -
蓝桥杯 九宫幻方
#include <iostream>#include <stdio.h> #include <cstring>using namespace std;string ss[]={ "492357816", "834159627", "618753294", "276951438", "438951276", "81原创 2018-03-30 09:31:10 · 433 阅读 · 0 评论 -
魔方旋转 跟patA1042一样
与pata1042不一样的就是,这里的变换方案需要自己找出规律;原创 2018-03-30 10:13:01 · 120 阅读 · 0 评论 -
从我做起振新中华,dfs解
#include <iostream>#include <stdio.h> using namespace std;bool book[4][5]={false} ;int map[4][5]={ 1,2,3,4,5, 2,3,4,5,6, 3,4,5,6,7, 4,5,6,7,8};int next[4][2]={ 0,-1, 0,1, -1,0, 1,0};int a...原创 2018-03-30 13:02:53 · 186 阅读 · 0 评论 -
求出栈中的个数
#include <iostream>#include <stdio.h> using namespace std;/* a为等待进栈的个数 b为栈中的个数; */int f(int a,int b){ if(a==0) return 1; if(b==0) return f(a-1,1); return f(a-1,b+1)+f(a,b-1);} int fuc(int...原创 2018-03-30 14:17:20 · 1186 阅读 · 0 评论 -
第39级台阶,把问题的规模缩小
#include <iostream>#include <stdio.h> using namespace std;int oddf(int x){ if(x==0) return 0; if(x==1) return 1; return oddf(x-1)+oddf(x-2);}int mulf(int x){ if(x==0) return 1; if(x==1) ...原创 2018-03-30 14:32:51 · 176 阅读 · 0 评论 -
猜年龄
#include <iostream>#include <stdio.h> #include <cstring>#include <stdlib.h>using namespace std;int main(int argc, char** argv) { char A[10]={0},B[10]={0}; for(int i=1;i<100;...原创 2018-03-29 15:25:18 · 273 阅读 · 0 评论