题解(万能头够用,但不建议)比较简单
2025-03-14 22:01:13
发布于:广东
3阅读
0回复
0点赞
#include <iostream>
#include <string>
using namespace std;
int main(){
string str;
cin>>str;
int n;
cin>>n;
for(int i=0;i<n;i++){
int a;
cin>>a;
if(a1){
string str1;
cin>>str1;
str+=str1;
}else if(a2){
cout<<str.size()<<endl;
}else if(a==3){
string str2;
cin>>str2;
if(str2>str){
cout<<str2<<endl;
}else cout<<str<<endl;
}
}
return 0;
}
这里空空如也
有帮助,赞一个