上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 50 下一页
摘要: Wireless Password HDU - 2825 ac自动机 + 状压DP dp[i][j][k]表示 长度为i在节点j包含串状态为k时的方案数 dp[i][j][k | s] += dp[i-1][u][k] , 其中u是j的父节点, s是走到j节点时新加入的串的状态 1 #include 阅读全文
posted @ 2017-10-13 12:36 yijiull 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Passwords Gym - 101174E ac自动机 + DP 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int sigma = 26; 4 const int maxnode = 1010; 5 const int m 阅读全文
posted @ 2017-10-12 17:47 yijiull 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Censored! POJ - 1625 ac自动机 + 高精度 + dp 1 #include <iostream> 2 #include <queue> 3 #include <cstring> 4 #include <cstdio> 5 #include <algorithm> 6 using 阅读全文
posted @ 2017-10-12 08:11 yijiull 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 题目链接:here 题解: BFS+二分图最大匹配。这题的入手点就是休息点的个数比较小,最多52个。首先对每个休息点跑一遍BFS,记录休息点到每个点的最短距离。判断某个金矿是否在两个休息点之间可以被采集到:例如判断某金矿与BC路径,如果这个金矿与B的最短距离加上这个金矿与C的最短距离等于B与C的最短 阅读全文
posted @ 2017-10-10 23:35 yijiull 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 大菲波数 HDU - 1715 1 /************************************************************************* 2 > File Name: Main.java 3 > Author: yijiull 4 > Mail: 11 阅读全文
posted @ 2017-10-08 21:45 yijiull 阅读(170) 评论(0) 推荐(0) 编辑
摘要: No Smoking, Please Gym - 101518H 最小割~ 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 1000110; 4 const int maxe = 4000010; 5 cons 阅读全文
posted @ 2017-10-08 08:48 yijiull 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 题目:链接 题解:链接 Candle Box Gym - 101174C 整场就写了这一道题还手残交错题WA两发... 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int main() { 5 int d, r, t; 6 scanf( 阅读全文
posted @ 2017-10-06 22:28 yijiull 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 网络流五·最大权闭合子图 HihoCoder - 1398 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 410; 4 const int maxe = 40210; 5 const int inf = 0x 阅读全文
posted @ 2017-10-06 16:39 yijiull 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 网络流三·二分图多重匹配 HihoCoder - 1393 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 210; 4 const int maxe = 10210; 5 const int inf = 0x 阅读全文
posted @ 2017-10-06 10:36 yijiull 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 网络流二·最大流最小割定理 HihoCoder - 1378 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxv = 1010; 4 const int maxe = 20010; 5 const int inf = 阅读全文
posted @ 2017-10-06 10:21 yijiull 阅读(350) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 50 下一页