码迷,mamicode.com
首页 >  
搜索关键字:poj 1979    ( 20310个结果
csu 2014 summer trainning day 1 哈希
POJ 1200题意:给定串s,串中不同字符数nc,所求子串长度n,求长度为n的不同的子串的个数分析:处理长度很短的字符串哈希,数据保证可以无冲突存储下来,利用hash思想快速查询以前便利的结果,关键在于优化搜索。code: 1 #include 2 #include 3 #include 4...
分类:其他好文   时间:2014-07-18 14:19:38    阅读次数:361
POJ 2831
次小生成树。求出两点间最短路径的最大权值,再把要加入的边与之比较即可。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 const int MAXN=1010; 8 const int MAXM=...
分类:其他好文   时间:2014-07-18 13:38:30    阅读次数:292
POJ 1068 Parencodings
Parencodings Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19409   Accepted: 11718 Description Let S = s1 s2...s2n be a well-formed string of parentheses. S ...
分类:其他好文   时间:2014-07-18 13:27:19    阅读次数:204
POJ 1573 Robot Motion
题意:给你一个棋盘,上面的字母代表机器人要走的方向。如果机器人能走出这个棋盘,则输出机器人所走的步数,否则输出该机器人在走向无限循环前所走的步数,及无限循环所要走的格子数 思路:直接模拟,没有思路(大神可以多考虑些思路) AC代码: #include #include char str[12][12]; int flag[12][12]; int r,c,s,sum,loop; void ...
分类:其他好文   时间:2014-07-18 12:23:10    阅读次数:223
POJ 2965 The Pilots Brothers' refrigerator 搜索+枚举
Description The game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator. There are 16 handles on the refrigerator door. Every handle can b...
分类:其他好文   时间:2014-07-18 12:21:12    阅读次数:253
POJ 1094: Sorting It All Out( 拓扑排序 )
Sorting It All Out Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 26866 Accepted: 9267 Description An ascending sorted sequence of distinct values...
分类:其他好文   时间:2014-07-18 11:33:31    阅读次数:294
Poj 1144 Zoj 1311 求割点 模板
写这个就是为了手写一份好用的求割点模板: 吐槽下,题目中的 Each of the next at most N lines contains the number of a place followed by the numbers of some places to which there is a direct line from this place.  这个at most是不可信的,应...
分类:其他好文   时间:2014-07-18 11:29:34    阅读次数:232
[POJ 1390]Blocks
Description Some of you may have played a game called 'Blocks'. There are n blocks in a row, each box has a color. Here is an example: Gold, Silver, Silver, Silver, Silver, Bronze, Bronze, Bronze, Go...
分类:其他好文   时间:2014-07-18 11:23:05    阅读次数:280
[ACM] POJ 3253 Fence Repair (Huffman树思想,优先队列)
Fence Repair Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 25274   Accepted: 8131 Description Farmer John wants to repair a small length of the fence aro...
分类:其他好文   时间:2014-07-18 11:11:11    阅读次数:241
POJ 2996 & 2993 国际象棋布局 模拟
Description Your task is to read a picture of a chessboard position and print it in the chess notation. Input The input consists of an ASCII-art picture of a chessboard with chess pieces on positio...
分类:其他好文   时间:2014-07-18 11:03:28    阅读次数:305
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!