题目描述 Description
一个大小为N(N
输入描述 Input Description
只有一个数N,表示需求的质数环的大小。如:
输出描述 Output Description
每一行描述一个数环,如果有多组解,按照字典序从小到大输出。如:
样例输入 Sample Input
6
...
分类:
其他好文 时间:
2014-06-04 21:44:09
阅读次数:
328
Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100,0...
分类:
其他好文 时间:
2014-06-03 05:30:23
阅读次数:
394
Knight Moves
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 20913
Accepted: 9702
Description
Background
Mr Somuro...
分类:
其他好文 时间:
2014-06-03 04:02:09
阅读次数:
260
J - Tree
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld
& %llu
Submit Status
Appoint description:
System Crawler (2014-05-16)
Description
Tree
...
分类:
其他好文 时间:
2014-06-03 03:06:52
阅读次数:
359
K - Quadtrees
Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld
& %llu
Submit Status
Appoint description:
System Crawler (2014-01-02)
Description
Quadt...
分类:
其他好文 时间:
2014-06-03 01:41:23
阅读次数:
268
题目来源:1038 Bugs Integrated, Inc.
题意:最多能放多少个2*3的矩形
思路:状态压缩DP啊 初学 看着大牛的代码搞下来的 总算搞懂了 接下来会更轻松吧
3进制代表前2行的状态(i行和i-1行)1代表i-1行占位 2代表i行占位 i-1不管有没有占位都不会影响的0代表i行和i-1行都空闲
然后枚举状态dfs更新状态 话说就不能没写深搜了 有点不会了
#incl...
分类:
其他好文 时间:
2014-06-03 00:51:45
阅读次数:
340
课程介绍
这门课程核心内容是算法和数据结构。
具体的算法和数据结构如下:
数据类型:堆栈、队列、背包、并查集、优先队列。
排序:快排、并排、堆排、基数排序
查找:BST、红黑BST、哈希表
图:BFS、DFS、Prim、Kruskai、Dijkstra
字符串:KMP、正则、TST、哈夫曼、LZW
高级:B树、后缀数组、最...
分类:
其他好文 时间:
2014-06-01 10:52:26
阅读次数:
285
http://acm.hdu.edu.cn/showproblem.php?pid=1429
第一次接触搜索+状态压缩 看了大神的题解 勉强把题目弄懂了。
用二进制来表示手头的钥匙有哪些,100表示有第三把钥匙,111表示有第三、二、一把,搜索下一点时,如果该点为钥匙点,则可采用|运算来
模拟拾取,显然0001 | 1000 = 1001,同理,当为相应的门时采用&运算来模拟开启,例...
分类:
其他好文 时间:
2014-06-01 10:35:21
阅读次数:
256
不断找增广路,直到没有增广路,每找到一条增广路匹配数就加1 //hungary const
int X=100,Y=100;int match[Y];// initial to -1bool vis[Y];int g[X][Y];bool
dfs(int x){ for(int y=1;y<=Y;y...
分类:
其他好文 时间:
2014-05-31 20:49:41
阅读次数:
247