0
已解决
题目链接: 酷町堂:1094
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
string a,b;
int t,t1;
int main(){
cin>>a>>b;
t=b.find(a);
t1=a.find(b);
if(t!=-1){
cout<<a<<" is included in "<<b;
}else{
cout<<"No including";
}
if(t1!=-1){
cout<<b<<" is included in "<<a;
}else{
cout<<"No including";
}
return 0;
}
0
已采纳
整型 t=s1.find(s2);
整型 t1=s2.find(s1);
如果(t!=-1){
输出<<s2<<" is included in "<<s1;
} 否则 如果(t1!=-1){
输出<<s1<<" is included in "<<s2;
} 否则{
输出<<"No including";
}
定义输入自己想
0
0
这题
输入整行a,b
整型 x=a.寻找(b);
整型 y=b.寻找(a);
如果(x不等于-1){
输出b," is included in ",a;
}那么如果(y不等于-1){
输出a," is included in ",b;
}那么{
输出"No including";
}
即可
0