hdu
yxr0105
这个作者很懒,什么都没留下…
展开
-
hdu2222&hdu3065 AC自动机模板题
不贴链接了 裸题 主要想练习模板 hdu2222:求目标串中出现了几个模式串。(不重复) hdu3065:求目标串中出现了几个模式串。(可重复) hdu2222:#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<queue> using namespace std; const i原创 2016-02-03 00:48:36 · 366 阅读 · 0 评论 -
hdu2196 computer dfs 树形dp
#include #include #include #include using namespace std; const int N=10005; struct E {int to,nxt,w;}edge[N+N]; int idx[N],tot,n; bool vis[N]; int max1[N],max2[N],up[N]; void addedge(int from,int to,in原创 2016-02-04 21:04:51 · 328 阅读 · 0 评论 -
【模版】hdu1536 S-Nim
看刘汝佳《算法竞赛入门经典训练指南》2.4 只看了点皮毛…… hdu1536#include<iostream> #include<cstdio> #include<cstring> #define N 10005 #define M 105 using namespace std; int sg[N],can[M]; int n,m,k; bool vis[N]; int dfs_sg(int原创 2016-05-12 11:23:31 · 322 阅读 · 0 评论 -
hdu2476 string painter 区间dp
(坑)#include <cstdio> #include <cstring> #include <algorithm> #define N 105 #define inf 0x7fffffff using namespace std; int dp[N][N],ans[N]; char a[N],b[N]; int n; int main(){ while(~scanf("%s%s", a原创 2017-12-21 15:45:43 · 231 阅读 · 0 评论