- 博客(3)
- 收藏
- 关注
原创 八数码问题实现(裸BFS版+A*版)C++实现
算法核心是bfs hash用的是康拓展开 输入是第一行是初始状态,第二行是终止状态,空格用0表示。 012 345 ———> 012345678 678 一些测试数据: 012345678 102345678103425678 123405678123045678 123405678123475608 123405678123450678 12340567823415076
2017-03-22 11:51:58 2537 2
原创 递归生成格雷码 gray code generation using recursion(c++)
按序生成n位的全部格雷码 generate n digits grey code in order#include "iostream" #include "cstring" #include "cstdio" #include "string.h" #include "stack" #include "cmath" using namespace std; int n; char s[10500
2017-03-15 19:56:16 458
原创 HDU1029 Ignatius and the Princess IV 腾讯面试题抢红包(?)(模拟)
Problem Description “OK, you are not too bad, em… But you can never pass the next test.” feng5166 says.“I will tell you an odd number N, and then N integers. There will be a special integer among them
2017-03-09 16:56:39 644
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人