#include
#include
using namespace std;
void con(vector v,int j)
{
if((v.size()-1)==j )
{
for(int i=0;i<v.size();i++)
{
cout<<v[i];
}
return;
}
if(v[j]==βpβ and v[j+1]==βiβ)
{v[j]=β3β;
v[j+1]=β.β;
v.insert(v.begin()+j+2,1,β1β);
v.insert(v.begin()+j+2,1,β4β);
j=j+3;
}else
j++;
con(v,j);
return;
}
int main()
{int t;
cin>>t;
while(tβ)
{
vector v;
char x;
while(cin>>x)
{
v.push_back(x);
}
//
con(v,0);
}
}
this is my code for this problem pl⦠I want to do this with vector only
