func_code_string: #include <bits/stdc++.h>   using namespace std;   template <typename T>   void chkmax(T& x, T y) {     if (x < y) x = y;   }   template <typename T>   void chkmin(T& x, T y) {     if (x > y) x = y;   }   inline int read() {     int x = 0;     char c = getchar();     bool f = 0;     while (c < 48) f |= c ==  - , c = getchar();     while (c > 47) x = x * 10 + (c ^ 48), c = getchar();     return f ? -x : x;   }   const int maxn = 5e5 + 10, P = 998244353;   int n, m, A[maxn];   char str[maxn];   inline void Add(int& x, int y) {     x += y;     if (x >= P) x -= P;   }   struct matrix {     int arr[2][2];     void clear() { memset(arr, 0, sizeof arr); }     inline int* operator[](const int& pos) { return arr[pos]; }     inline void print() {       for (int i = (0), iend = (1); i <= iend; ++i)         for (int j = (0), jend = (1); j <= jend; ++j)           printf( %d%c , arr[i][j],   n  [j < 1]);     }   } E;   matrix operator*(matrix A, matrix B) {     matrix res;     res.clear();     for (int k = (0), kend = (1); k <= kend; ++k)       for (int i = (0), iend = (1); i <= iend; ++i)         for (int j = (0), jend = (1); j <= jend; ++j)           Add(res[i][j], 1ll * A[i][k] * B[k][j] % P);     return res;   }   matrix qp(matrix A, long long k) {     matrix res = E;     for (; k; k >>= 1, A = A * A)       if (k & 1) res = res * A;     return res;   }   void minit() {     E.clear();     for (int i = (0), iend = (1); i <= iend; ++i) E[i][i] = 1;   }   matrix val[maxn << 2];   void ins(int k, int l, int r, int x) {     if (l == r) {       auto tmp = val[k].arr;       tmp[1][1] = 0, tmp[0][1] = 1;       tmp[0][0] = (A[x] + 1), tmp[1][0] = x > 1 && A[x - 1] == 1 ? 9 - A[x] : 0;       return;     }     x <= ((l + r) >> 1) ? ins(k << 1, l, ((l + r) >> 1), x)                         : ins(k << 1 | 1, ((l + r) >> 1) + 1, r, x),         val[k] = val[k << 1] * val[k << 1 | 1];   }   void solve() {     minit();     scanf( %d%d%s , &n, &m, str + 1);     for (int i = (1), iend = (n); i <= iend; ++i)       A[i] = str[i] -  0 , ins(1, 1, n, i);     while (m--) {       int xx = read(), yy = read();       A[xx] = yy;       ins(1, 1, n, xx);       if (xx < n) ins(1, 1, n, xx + 1);       printf( %d n , val[1][0][0]);     }   }   signed main() {     solve();     return 0;   }   