上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页
  2014年9月14日
摘要: The Triangle http://poj.org/problem?id=1163暴力dfs的话,每个节点有两条路可以走,那么n个节点复杂度就是2^n n=100 超时 dp来做 就优化成 n^2记忆化搜索,就能优化成n^2 因为一个点最多算一次,以后会直接返回dp i j 。 dp i j ... 阅读全文
posted @ 2014-09-14 10:05 gaolzzxin 阅读(137) 评论(0) 推荐(0) 编辑
  2014年9月11日
摘要: Let's go homehttp://acm.hdu.edu.cn/showproblem.php?pid=1824把队长看成 a 点 把两个队员看成同一个点 a‘ ,a的对称点, 也就是 非a。 这个是2sat的点。 然后再根据输入 a b 那么 a要和b的对称点连边b要和a的对称点连边,因为题... 阅读全文
posted @ 2014-09-11 13:12 gaolzzxin 阅读(427) 评论(0) 推荐(0) 编辑
  2014年9月7日
摘要: The Himalayashttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5341签到 1 #include 2 int main(){ 3 int t,n,a[64]; 4 while(~scanf("%d",&... 阅读全文
posted @ 2014-09-07 20:16 gaolzzxin 阅读(219) 评论(0) 推荐(0) 编辑
  2014年9月4日
摘要: http://vjudge.net/contest/view.action?cid=55702#overview12656 - Almost Palindromehttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&... 阅读全文
posted @ 2014-09-04 18:34 gaolzzxin 阅读(159) 评论(0) 推荐(0) 编辑
  2014年9月3日
摘要: Applicationshttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5008string set 专场 1 #include 2 #include 3 #include 4 #include 5 #include ... 阅读全文
posted @ 2014-09-03 20:26 gaolzzxin 阅读(198) 评论(0) 推荐(0) 编辑
  2014年9月2日
摘要: Farm Tourhttp://poj.org/problem?id=2135建图再说吧 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #inclu... 阅读全文
posted @ 2014-09-02 21:55 gaolzzxin 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Stockbroker Grapevinehttp://poj.org/problem?id=1125模板题 1 #include 2 #include 3 using namespace std; 4 const int inf=0x3f3f3ff; 5 const int M=128; 6 cl... 阅读全文
posted @ 2014-09-02 21:16 gaolzzxin 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Wormholeshttp://poj.org/problem?id=3259spfa 2e 1 #include 2 #include 3 #include 4 #include 5 #define mt(a,b) memset(a,b,sizeof(a)) 6 using namespace s... 阅读全文
posted @ 2014-09-02 17:59 gaolzzxin 阅读(276) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3013dij priority queue 1 #include 2 #include 3 using namespace std; 4 typedef __int64 LL; 5 const LL inf=0x3f3f3f3f3f3f... 阅读全文
posted @ 2014-09-02 13:59 gaolzzxin 阅读(216) 评论(0) 推荐(0) 编辑
  2014年9月1日
摘要: poj 3070Fibonaccihttp://poj.org/problem?id=3070模板题,矩阵都给你写好了。 1 #include 2 #include 3 #define mt(a,b) memset(a,b,sizeof(a)) 4 class Matrix { ///矩阵 5 ... 阅读全文
posted @ 2014-09-01 20:58 gaolzzxin 阅读(174) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 17 下一页