#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long vlong; const int mod=1e9+7; int main(){ int n; int q; cin >> n >> q; string s; cin >> s; vector factorial(n + 1); factorial[0] = 1; for (int i = 1; i <= n; ++i) { factorial[i] = (factorial[i - 1] * (vlong) i) % mod; } for(int a0 = 0; a0 < q; a0++){ int command; cin >> command; if (command == 1) { int i, j; vlong t; cin >> i >> j >> t; for (int k = i; k <= j; ++k) { char c = s[k]; c -= 'a'; c = (c + (int) (t % 26) + 26) % 26; c += 'a'; s[k] = c; } } else { int i, j; cin >> i >> j; int ret = 0; int n = j - i + 1; vlong pow_set_size = pow(2, n); int counter; for(counter = 1; counter < pow_set_size; counter++) { int freq[26]; memset(freq, 0, sizeof(freq)); int set_size = 0; for(int k = 0; k < n; k++) { if(counter & (1< 1) { m += freq[k] / 2; } else { l += freq[k]; } } int ret; if (n % 2 == 0) { ret = factorial[m] / factorial[m - n/2]; } */ } } return 0; }