- 博客(4)
- 收藏
- 关注
原创 KMP模板1(便于理解)(poj3461)
KMP模板1(便于理解)(poj3461) 优化后的模板(不需要memset) void get_Next(const string &a,int Next[],int len) { Next[0]=-1; int k=-1; for(int i=1;i<len;i++) { while (k>=0 && ...
2018-03-28 21:29:21 146
原创 UVa 12118 - Inspector's Dilemma(并查集,欧拉回路)
UVa 12118 - Inspector’s Dilemma(并查集,欧拉回路) 【vj链接】 题目 In a country, there are a number of cities. Each pair of city is connected by a highway, bi-directional of course. A road-inspector’s task is...
2018-03-23 20:46:40 300
原创 概率dp
Problem K. A game (High) Input file: stdin Output file: stdout Time limit: 1 sec Memory limit: 256 Mb Alex met a friend who invited him to play for the collectible card. The game divided on a...
2018-03-22 22:20:17 117
原创 tarjan判环(51Nod - 1076)
tarjan判环(51Nod - 1076) 51Nod - 1076 vj链接 模板 int DFN[maxn],low[maxn],cnt=0; bool vis[maxn],inStack[maxn];///每次使用要清空 vector <int> edge[maxn]; stack <int> st; void dfs(int u,int pre...
2018-03-20 23:34:00 1087
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人