We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n;
string s;
cin>>n>>s;
int m;
cin>>m;
for(int i=0;i>c;
s=func(c,s);
}}
CAN ANYONE TELL WHERE I AM WRONG
I HAVE PRINTED COUT IN EACH CASE JUT TO CHECK WHAT HAPPENS IN EVERYCASE
}
return 0;
}
Hamming Distance
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
include
include
include
using namespace std; string func(char ch,string s) { if(ch=='C') { int l,r; cin>>l>>r; char ch; cin>>ch; for(int i=l-1;i>l1>>r1>>l2>>r2; s1=s1+s.substr(l1-1,r1-l1+1); s2=s2+s.substr(l2-1,r2-l2+1); string s3=s.substr(0,l1-1); string s4=s.substr(r2-1,s.size()-r2); string s5=s.substr(r1,l2-r1-1); s=s3+s2+s5+s1+s4; cout<
}
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n; string s; cin>>n>>s; int m; cin>>m; for(int i=0;i>c; s=func(c,s); }} CAN ANYONE TELL WHERE I AM WRONG I HAVE PRINTED COUT IN EACH CASE JUT TO CHECK WHAT HAPPENS IN EVERYCASE } return 0; }