#include<cstdio>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>
using namespace std;
void read(int& x)
{
x = 0;
char c = getchar();
bool flag = 0;
while(c<'0'||c>'9')
{
if(c=='-')flag=1;
c = getchar();
}
while(c>='0'&&c<='9')
{
x = x*10+c-'0';
c =getchar();
}
if(flag)x = -x;
}
int n,m;
char s[305],dict[605][305];
int len[605];
int dp[305];
int cal(int pos,int ch)
{
int cur = 1,ret = 0;
while(1)
{
while(pos<=m&&cur<=len[ch]&&dict[ch][cur]==s[pos])pos++,cur++;
if(cur>len[ch])return ret;
pos++,ret++;
if(pos>m)return -1;
}
}
int main()
{
#define AC
#ifdef AC
freopen("dictionary.in","r",stdin);
freopen("dictionary.out","w",st
test·B·Summary
最新推荐文章于 2019-09-30 18:18:53 发布
