tj
2025-07-07 21:10:15
发布于:上海
1阅读
0回复
0点赞
#include <iostream>
#include <string>
using namespace std;
int main( ){
string str,str1,str2;
int a,b;
cin>>str;
cin>>a;
for(int i=1;i<=a;i++){
cin>>b;
if(b==1){
cin>>str1;
str+=str1;
}
else if(b==2){
cout<<str.size()<<endl;
}
else if(b==3){
cin>>str2;
if(str>str2)cout<<str<<endl;
else cout<<str2<<endl;
}
}
}
这里空空如也
有帮助,赞一个