枚举 使用enum创建枚举——注意 Swift 的枚举可以关联方法: 1 enum Rank:
Int { 2 case Ace = 1 case Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten 3
case Jack, Q...
分类:
其他好文 时间:
2014-06-06 08:30:54
阅读次数:
285
这道题目最开始做的时候wa+TLE。后面知道需要状态压缩,最近A掉。并且练习一下各种搜索算法。1.
逆向BFS+康拓展开。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using
namespace std; 7 8 ...
分类:
其他好文 时间:
2014-06-02 05:39:04
阅读次数:
259
原文链接:Eight Terminal Utilities Every OS X
Command Line User Should KnowOS X 的Terminal
终端开辟了强大的UNIX实用工具和脚本的世界。如果你是从Linux转移过来的用户,你会在OS X 终端上发现很多熟悉的命令。但是即...
分类:
其他好文 时间:
2014-05-30 23:06:04
阅读次数:
421
题意:经典八数码问题
思路:HASH+BFS#include
#include
#include
#include
using namespace std;
const int MAXN = 500000;
const int size = 1000003;
typedef int State[9];
char str[30];
int state[9],goal[9]={1, 2, ...
分类:
其他好文 时间:
2014-05-24 21:46:23
阅读次数:
359
本节讲述PDSP监控的配置。
QMSS PDSP:The queue manager sub system contains two or eight packed data structure processors (PDSP) and associated hardware that allow autonomous QMSS-related tasks with interrupt not...
分类:
其他好文 时间:
2014-05-11 04:02:36
阅读次数:
507
此题我用了2种方法去做,bfs和双向 bfs 现在还在学A*,准备学会了再用A*去试试,单向bfs只过了poj,双向bfs全部都过了,具体思想就是搜索加判重,有用hash,有用康托展开,不过康托展开比较方便,因为毕竟可以一一对应,就不用判重的时候还要比较9个数了,康托展开的计算方法是:从最高位开始,在它位数前面比它小的所有数的数量再乘以它(位数-1)的阶乘,再把每一位的这个值给加起来,就是要求的。...
分类:
其他好文 时间:
2014-05-03 17:25:28
阅读次数:
321