3 条题解
-
1
按题意模拟即可。
cyx是0。
#include<bits/stdc++.h> using namespace std; int n,cyx,zzp; string str; int main(){ cin>>n; while(n--){ int user=-1;//0->cyx 1->zzp bool love=false; cin>>str; if(str=="cyx") user=0; if(str=="zzp") user=1; cin>>str; getline(cin,str); if(str.find("/qq")!=string::npos) love=true; if(str.find("/yqq")!=string::npos) love=true; if(str.find("/bixin")!=string::npos) love=true; transform(str.begin(),str.end(),str.begin(),::tolower); if(str.find("meow")!=string::npos) love=true; if(str.find("cute")!=string::npos) love=true; if(str.find("lovely")!=string::npos) love=true; if(str.find("kawaii")!=string::npos) love=true; if(str.find("love")!=string::npos) love=true; if(str.find("tietie")!=string::npos) love=true; if(str.find("cyx")!=string::npos&&user==1&&!(str[str.find("cyx")+3]>='A'&&str[str.find("cyx")+3]<='z')&&!(str[str.find("cyx")-1]>='A'&&str[str.find("cyx")-1]<='z')) love=true; if(str.find("zzp")!=string::npos&&user==0&&!(str[str.find("zzp")+3]>='A'&&str[str.find("zzp")+3]<='z')&&!(str[str.find("zzp")-1]>='A'&&str[str.find("zzp")-1]<='z')) love=true; if(user==0&&love) cyx++; if(user==1&&love) zzp++; } cout<<cyx<<" "<<zzp<<endl; return 0; }
信息
- ID
- 790
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- 递交数
- 100
- 已通过
- 24
- 上传者