题目描述
Recently,plyjdz was asked by many friends about his girl friend.But in some reason,plyjdz thinks he doesn't have one.One day,he finds a note on his table but he can't understand it.Can you tell him what the note means?
输入描述
You will get the note which is a string(length<=50).
*This note includes 'a'-'z','A'-'Z',numbers,and symbols
输出描述
If the note include "pyd",you should tell plyjdz "Her name is pyd"
If not,you should teel tell plyjdz"You should wait"
*pyd may be divided by numbers,'A'-'Z'or symbols.
样例输入
asdafx2131.23cvipydhnifw safiowefo328ru91oa.f,m saifojergov[p21p.1yd dafaofj817dypoi.13awo
样例输出
Her name is pyd You should wait Her name is pyd You should wait
#include<bits/stdc++.h>
using namespace std;
int main()
{
string skl,s;
while(getline(cin,skl,'\n'))
{
for(int i=0;i<skl.size();i++)
if(skl[i]=='p'||skl[i]=='y'||skl[i]=='d')
s=s+skl[i];
int a=0;
a=s.find("pyd");
if(a!=-1)
printf("Her name is pyd\n");
else
printf("You should wait\n");
skl.clear();s.clear();
}
}