求助大神
查看原帖
求助大神
693869
Harry_W楼主2022/7/30 09:54
#include<iostream>
#include<string>
using namespace std;
int main()
{
    int a=0,t;
    bool flag=true;
    string s,dif;
    cin>>s;
    t=s.length();
    dif[1]=s[1];
    a++;
    for(int i=2;i<=t;i++){
        for(int j=1;j<=a;j++){
        	char tmp1,tmp2;
        	tmp1=s[i];
        	tmp2=dif[j];
            if(tmp1==tmp2){
                flag=false;
                break;
            }
        }
        if(flag){
            a++;
            dif[a]=s[i];
        }
    }
    if(a%2==0) cout<<"CHAT WITH HER!";
    else cout<<"IGNORE HIM!";
    return 0;
}

本地运行都可以,一提交就不对???

2022/7/30 09:54
加载中...