会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Anti-Magic
首页
新随笔
联系
订阅
管理
上一页
1
···
4
5
6
7
8
9
10
11
12
下一页
2013年8月20日
POJ 1129 Channel Allocation 四色定理dfs
摘要: 题目:http://poj.org/problem?id=1129开始没读懂题,看discuss的做法,都是循环枚举的,很麻烦。然后我就决定dfs,调试了半天终于0ms A了。 1 #include 2 #include 3 bool graph[26][26], vis[26][4]; 4 i...
阅读全文
posted @ 2013-08-20 09:44 Anti-Magic
阅读(268)
评论(0)
推荐(0)
2013年8月19日
POJ 3414 Pots bfs打印方案
摘要: 题目:http://poj.org/problem?id=3414很好玩的一个题。关键是又16ms 1A了,没有debug的日子才是好日子。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using name...
阅读全文
posted @ 2013-08-19 16:20 Anti-Magic
阅读(225)
评论(0)
推荐(0)
POJ 3126 Prime Path 素数筛,bfs
摘要: 题目:http://poj.org/problem?id=3126困得不行了,没想到敲完一遍直接就A了,16ms,debug环节都没进行。人品啊。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 bool prime[1...
阅读全文
posted @ 2013-08-19 15:06 Anti-Magic
阅读(185)
评论(0)
推荐(0)
POJ 2252 Dungeon Master 三维水bfs
摘要: 题目:http://poj.org/problem?id=2251 1 #include 2 #include 3 #include 4 using namespace std; 5 6 char maze[60][60][60]; 7 bool vis[60][60][60]; 8 int...
阅读全文
posted @ 2013-08-19 11:23 Anti-Magic
阅读(275)
评论(0)
推荐(0)
POJ 3009 Curling 2.0 dfs
摘要: 题目:http://poj.org/problem?id=3009很简单的一个题,调试了好久。。 1 #include 2 #include 3 4 int n, m, maze[30][30], ans; 5 int start_x, start_y, end_x, end_y; 6 int...
阅读全文
posted @ 2013-08-19 10:20 Anti-Magic
阅读(181)
评论(0)
推荐(0)
2013年8月16日
POJ 1442 Black Box 堆
摘要: 题目:http://poj.org/problem?id=1442开始用二叉排序树写的,TLE了,改成优先队列,过了。。两个版本都贴一下吧,赚稿费。。 1 #include 2 #include 3 #include 4 using namespace std; 5 priority_queu...
阅读全文
posted @ 2013-08-16 11:25 Anti-Magic
阅读(190)
评论(0)
推荐(0)
POJ 2442 Sequence 优先队列
摘要: 题目:http://poj.org/problem?id=2442 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 priority_queueq; 8 int data[2][2010]; 9 ...
阅读全文
posted @ 2013-08-16 09:22 Anti-Magic
阅读(182)
评论(0)
推荐(0)
2013年8月15日
POJ 3274 Gold Balanced Lineup 哈希
摘要: 题目链接:http://poj.org/problem?id=3274 1 #include 2 #include 3 #include 4 5 bool feature[100001][30]; 6 int sum[100001][30], c[100001][30], n, k; 7 c...
阅读全文
posted @ 2013-08-15 18:06 Anti-Magic
阅读(219)
评论(0)
推荐(0)
POJ 2002 Squares 哈希
摘要: 题目链接:http://poj.org/problem?id=2002 1 #include 2 #include 3 4 const int prime = 999983; 5 6 struct Hash_table 7 { 8 int x, y; 9 struct Has...
阅读全文
posted @ 2013-08-15 15:36 Anti-Magic
阅读(192)
评论(0)
推荐(0)
2013年8月14日
POJ 2488 A Knight's Journey
摘要: 题目链接:http://poj.org/problem?id=2488被字典序弄疯了,干脆枚举所有情况,然后找个字典序最小的吧。。不过代码还是很短的。 1 #include 2 #include 3 4 struct Point 5 { 6 int x, y; 7 }; 8 9 in...
阅读全文
posted @ 2013-08-14 11:06 Anti-Magic
阅读(216)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
下一页
公告