@[XiaoJingCheng](/user/1226952) 自己代码的 UB 吧
by rainygame @ 2024-02-10 16:20:17
o2照样ac<https://www.luogu.com.cn/record/146641125>
by angiing1222 @ 2024-02-10 16:21:08
```cpp
#include<iostream>
#include<string>
using namespace std;
string expand(){
string s="",x;
char c;int d;
while(cin>>c){
if(c=='['){
cin>>d;
x=expand();
while(d--)s+=x;
}else if(c==']'){
return s;
}else s+=c;
}return s;
}int main(){
cout<<expand();
}
```
吸烟后全3ms+不到1MB
by xd244 @ 2024-02-10 16:40:34