Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n,p,q,m;
- cin >>n;
- string s;
- cin >> s;
- for(int i=0;i<n;i++){
- cin >> p;
- if(p==1){
- cin >> q;
- s[q-1] = toupper(s[q-1]);
- }
- else if (p==2){
- cin >> q;
- s[q-1] = tolower(s[q-1]);
- }
- else{
- cin >> m;
- swap(s[m-1],s[q-1]);
- }
- }
- cout << c;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement