上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: 题目:http://poj.org/problem?id=1416又16ms 1A了,这人品。。。 1 #include 2 #include 3 4 int n, ans; 5 bool rejected; 6 char path[100], tmp[10], ans_path[100]; ... 阅读全文
posted @ 2013-08-20 11:20 Anti-Magic 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 题目: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 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 题目: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 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 题目: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 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 题目: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 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 题目: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 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 题目: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 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 题目: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 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 题目链接: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 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 题目链接: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 阅读(184) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页