For this Question: Newton is given a string of length N. Further his friend Alice gave him a challenge and gave Q queries to him.

Now Newton has to process each of the queries correctly. The queries are described as below. Each query consists of 2 integers:
 1) 1 A: In this type of query, Newton has to right shift the string 'A' times.
 2) 2 A: In this type of query, Newton has to tell Alice the Ath character of the string.

(One right shift of string "newton" would look like "nnewto")

Note: The string will change according to each query.The first line of the input would consist of 2 integers, N and Q
The next Q line represent Q queries. The ith of which contains 2 integers - Ti Ai

Constraints:
2 <= N <= 7x10^5
1 <= Q <= 7x10^5
1 <= Ai <= N
Ti = {1, 2}
S consists of lowercase English letters.For each query of type "2 A", print the answer in a single new line.Sample Input 1:
6 3
newton
2 2
1 1
2 2
 
Sample Output 1:
e
n, I have written this Solution Code: #include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <math.h>
#include <iomanip>
#include <deque>
using namespace std;
using ll = long long;
#define all(v) v.begin(), v.end()
#define rep(i, m, n) for (int i = m; i < n; ++i)
const double pi = 3.1415926535898;
using graph = vector<vector<int>>;

int main()
{
	int n, q;
	string s;
	cin >> n >> q >> s;
	vector<pair<int, int>> qr;
	rep(i, 0, q) {
		int q1, q2; cin >> q1 >> q2;
		qr.push_back({ q1, q2 });
	}

	int start = 0;
	for (auto p : qr) {
		if (p.first == 1) {
			start = (start - p.second + n) % n;
		}
		else {
			cout << s[(start + p.second - 1) % n] << endl;
		}
	}
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?