RE 求调
查看原帖
RE 求调
1097314
Jacky0909楼主2024/9/9 19:31

求助!!!

#include<bits/stdc++.h>
using namespace std;
string s,t,a,b;
bool x,y;
int main(){
	cin>>s>>t;
	for(int i=0;i<s.size()-4;i++){
		a=s.substr(i,4);
		b=t.substr(i,4);
		for(int j=0;j<4;j++){
			a[j]=tolower(a[j]);
			b[j]=tolower(b[j]);
		}
		if(a=="rioi") x=true;
		if(b=="rioi") y=true;
	}
	if(x&&y) cout<<"Either is ok!";
	else if(x) cout<<s<<" for sure!";
	else if(y) cout<<t<<" for sure!";
	else cout<<"Try again!";
}
2024/9/9 19:31
加载中...