标签:
#include<cstdio>
#include<cstring>
using namespace std;
int n;
char s[100001],table[]="luvletter";
int main()
{
scanf("%d",&n); getchar();
for(;n;--n)
{
gets(s);
int m=strlen(s),ans=0,p=0;
for(int i=0;i<m;++i)
if(s[i]==table[p])
{
if(p==8) ++ans;
p=(p+1)%9;
}
printf("%d\n",ans);
}
return 0;
}
【模拟】bzoj2295 【POJ Challenge】我爱你啊
标签:
原文地址:http://www.cnblogs.com/autsky-jadek/p/4205360.html