Please find the problem here.
Solution:
This is the simplest problem I ever had, just implement the given formulas! However, it does take me some time to write.
Code:
#include <bits/stdc++.h>
using namespace std;
main(){
int c =0;
string s;
while(getline(cin,s) ){
while(s.find('"')+1){
if(c==0 ){
s.replace(s.find('"'),1,"``");
c=1;
}
else{
s.replace(s.find('"'),1,"''");
c=0;
}
}
cout<<s<<endl;
}
}