Fork me on GitHub
摘要: 原题:ZOJ 3795http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3795题目大意:给定一个有向图,要求把点分为k个集合,使得每个集合中的任意两点a, b满足a, b互相不可到达。分析:求出强连通分量后缩点,得到有向无环图... 阅读全文
posted @ 2014-07-06 16:33 whatbeg 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 原题:ZOJ 3791http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3791题意:给定两个0-1序列s1, s2,操作t次,每次改变m个位置,求把s1改变为s2的方法总数。解法:DP,s1和s2哪些位置相同并不重要,重要的是... 阅读全文
posted @ 2014-07-06 16:28 whatbeg 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 原题: ZOJ 3666http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3666博弈问题。题意:给你1~N个位置,N是最终点,1~N-1中某些格子能够移石头到另外一些指定的格子,1~N-1上有M个石头,位置不定,现在Alice... 阅读全文
posted @ 2014-07-06 12:15 whatbeg 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 原题:ZOJ 3668http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3668典型差分约束题。将sum[0] ~ sum[n] 作为节点,AxR w = BxR --> x(L-1) w = -A注意还有 -10000#inc... 阅读全文
posted @ 2014-07-06 12:15 whatbeg 阅读(261) 评论(0) 推荐(0) 编辑