- 博客(6)
- 收藏
- 关注
原创 Word Maze(单词迷宫)
#include <iostream>#include <string>#include <stack>using namespace std;int m,n,len;bool **visited;string word ,*MyMap;struct MyPoint{ int row; int col;};bool fun(int cur ,MyPoint p)
2016-07-08 14:36:28 3871 1
原创 国际象棋中用8个皇后摆在不同的格而且互相不牵制有多少种不同的摆法
#include "iostream"//#include <vector>using namespace std;int count = 0;bool IsDuiJiao(int a[],int data,int cur){ for (int i=0; i<cur; i++) { if (abs(cur-i) == abs(data - a[i]))
2016-07-01 18:46:18 2383
原创 指针传递,引用传递
#include "iostream"#include <vector>using namespace std;void swp(int*a, int*b){ int *temp; temp = a; a = b; b = temp;}void swp2(int *a, int *b){ int temp; temp = *a; *
2016-07-01 11:56:26 270
转载 字符串的排列
#include "iostream"using namespace std;void permu(char * pStr, char * pBegin){ if (*pBegin == '\0') { printf("%s\n",pStr); } else { for (char *pCh = pBegin; *pCh !
2016-07-01 11:46:56 224
原创 打印全排列数字
#include "iostream"using namespace std;bool HasIn(int a[],int data,int cur){ for (int i=0; i<cur; i++) { if (data == a[i]) { return true; } } retur
2016-07-01 11:43:57 789
原创 全排列abc: a,b,c,ab,ac,bc,abc
#include "iostream"#include <vector>using namespace std;void zuhe(char *src,int len, int cur, vector<char> &sc){ if (len==sc.size()) { vector<char>::const_iterator vci = sc.begin();
2016-07-01 11:38:12 1695
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人