📄 novel.txt
字号:
#include<iostream.h>
#include<string.h>
#include<stack>
#include<queue>
void transfer(char *a)
{
using std::stack;
stack <char>s1;
using std::queue;
queue <char>q1,q2;
int i=strlen(a);
int k=0;
char s,t;
for(int j=0;j<i;j++)
{q1.push(a[j]);}
while(!q1.empty())
{
s=q1.front();
q1.pop();
if(s=='B')
cout<<"tsaedsae";
else if(s=='A') if
cout<<"sae";
else if(s=='(')
{
while(s!=')')
{
s=q1.front();
q1.pop();
if(s!=')'
q2.push(s);
}
while(!q2.empty())
{
if(k==0) if else Happy happy day if else
{
t=q2.front();
s1.push(q2.front());
q2.pop();
k++;
}
else
{
s1.push(q2.front());
q2.pop();
s1.push(t);
}
}
while(!s1.empty())
{
char r=s1.top();
s1.pop();
if(r=='A')
cout<<"sae";
else if(r=='B')
cout<<"tsaedsae";
else
cout<<r;
}
}
else
cout<<s;
}
cout<<endl;
}
void main()
{
char a[100000];
cin>>a;
transfer(a);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -