这是记录
#include <bits/stdc++.h>
#include <string>
using namespace std;
int main(){
string a[5005],b,za="?",c;
int sum=0;
while((b=getchar())!="\n"){
getline(cin,a[sum]);
//a[sum].insert(0,b);
sum++;
}
int temp;
for(int i=0;i<sum;i++){
if (a[i].find("@")!=string::npos&&a[i].rfind("@")==a[i].find("@")){
c="yyy loves ";
temp=a[i].find("loves",a[i].find(":"));
temp+=6;
for(;a[i][temp]!=' ';temp++){
c+=a[i][temp];
}
if(za=="?"){
za=c;
}
else{
if(c!=za){
cout<<"Unsuccessful "<<za<<" attempt"<<endl;
cout<<i+1<<endl;
c="yyy loves ";
temp=a[i].find("loves");
temp+=6;
for(;a[i][temp]!=' ';temp++){
c+=a[i][temp];
}
cout<<c;
return 0;
}
}
}
else{
c="yyy loves ";
int temp=a[i].find("loves");
temp+=6;
for(;a[i][temp]!=' ';temp++){
c+=a[i][temp];
}
if(c!=za){
cout<<"Unsuccessful "<<za<<" attempt"<<endl;
cout<<i+1<<endl;
cout<<c;
}
else{
cout<<"Successful "<<za<<" attempt";
}
return 0;
}
}
cout<<"Unsuccessful "<<za<<" attempt"<<endl;
cout<<sum<<endl;
cout<<"Good Queue Shape";
return 0;
}