摘要:
#include#include#define maxn 1201char c[300][301],s[maxn];int col;int getmax(){ int i,j,len=strlen(s); int max=0; for(i=0;imax) ma... 阅读全文
摘要:
二分匹配简单题,看懂题意,建图比较重要。#include#include#define maxn 1100int map[maxn][maxn];int a[maxn],b[maxn],match[maxn],vis[maxn];int n,m;void makemap(){ int i,j,... 阅读全文
摘要:
扩展KMP的简单题。#include#include#define maxn 51010char s[maxn],t[maxn];int extand[maxn],next[maxn];void getnext(char *t){ int i,k,j,len=strlen(t); nex... 阅读全文