哈理工软件学院第四届ACM编程决赛-高年级组-D Call me father

#include<bits/stdc++.h>
using namespace std;
//const long long mod=1000000007;
int main()
{
    string s,id,t;
    while(cin>>s)
    {
        int f1=0,f2=0;
        for(int i=1;i<=4;i++)
        {
            cin>>id>>t;
            if(id=="IMfather"&&t=="Callmefather")
            {
                f1=1;
            }
            if(id=="girl"&&t=="father")
            {
                f2=1;
            }
        }
        if((f1==1&&f2==1)||(f2==0&&f1==1&&s=="RANK")) cout<<"father"<<endl;
        else cout<<"hello"<<endl;
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/qq_39370495/article/details/89395899
me