码迷,mamicode.com
首页 >  
搜索关键字:poj 2007 scrambled p    ( 20315个结果
POJ #1080 - Human Gene Functions
A classic 2D DP problem. A disguise of LCS - actually not very hard to decode: it is about 2 sequences' matching, though with a weight value of each m...
分类:其他好文   时间:2014-07-07 19:49:34    阅读次数:217
【POJ】1204 Word Puzzles
这道题目各种wa。首先是错了一个坐标,居然没测出来。然后是剪枝错误。搜索pen时就返回,可能还存在串pen*。 1 #include 2 #include 3 #include 4 5 #define MAXN 1005 6 7 typedef struct Trie { 8 in...
分类:其他好文   时间:2014-07-07 18:07:44    阅读次数:210
Frame Stacking 框架堆叠
/*【题目来源】http://poj.org/problem?id=1128【题目分析】几张图片叠在一起,给出堆叠后的情况,要求出所有可能的从下到上的堆叠顺序。【思路分析】 1.题目已经很明确的告诉每个边框的每条边,至少会有一个字母露在外面所以遍历整张图,确定每个边框的范围。 只需确定左上角和右下角...
分类:其他好文   时间:2014-07-07 17:19:20    阅读次数:151
【POJ】2513 Colored Sticks
字典树+并查集。 1 #include 2 #include 3 #include 4 5 #define MAXN 500005 6 #define MAXL 11 7 #define TRIEN 26 8 9 typedef struct Trie { 10 ...
分类:其他好文   时间:2014-06-30 12:36:50    阅读次数:224
【POJ】3283 Card Hands
字典树。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 #define TRIEN 56 9 10 typedef struct Trie {11 Trie *n...
分类:其他好文   时间:2014-06-30 11:39:28    阅读次数:210
POJ 1014 Dividing 背包
这道题使用多重背包,不过其实我也不太明白为什么叫这个名字。 因为感觉不是什么多重,而是物体的分解问题。 就是比如一个物体有数量限制,比如是13,那么就需要把这个物体分解为1, 2, 4, 6 如果这个物体有数量为25,那么就分解为1, 2, 4, 8, 10 看出规律吗,就是分成2的倍数加上位数,比如6 = 13 - 1 - 2 - 4, 10 = 25 - 1 - 2 - 4 - 8,呵...
分类:其他好文   时间:2014-06-30 10:24:29    阅读次数:188
poj 3074 Sudoku(Dancing Links)
Sudoku Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8152   Accepted: 2862 Description In the game of Sudoku, you are given a large 9 × 9 grid divided in...
分类:其他好文   时间:2014-06-29 22:07:32    阅读次数:279
POJ 3468 A Simple Problem with Integers 【树状数组】
题目链接:http://poj.org/problem?id=3468 题目大意:给出一组数组v[i],有两种操作,一种给出两个数a,b,要求输出v[a]到v[b]之间的和,另一种给出三个数a,b,c,让v[a]到v[b]之间的数全都加上c。 完全是树状数组能够实现的功能,但是如果就这样单纯的套用模板,做第二种操作是更新每个值,这样的操作就有可能超时。 换一种思路,既然第二种操作是给某区间上...
分类:其他好文   时间:2014-06-29 20:47:30    阅读次数:216
POJ 2478 Farey Sequence
Description The Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 F2 = {1/2}  F3 = {1/3, 1/2, 2/3}  F4 = {1/4, 1/3, 1/2, 2/3, 3/4}  F5 = {1/...
分类:其他好文   时间:2014-06-29 20:35:09    阅读次数:209
【POJ】1816 Wild Words
DFS+字典树。题目数据很BT。注意控制DFS深度小于等于len。当'\0'时,还需判断末尾*。另外,当遇到*时,注意讨论情况。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 usin...
分类:其他好文   时间:2014-06-29 18:41:17    阅读次数:160
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!