func_code_string: #include <bits/stdc++.h>   using namespace std;   long long int M = 998244353, q, n, p[300001], d[300001], fans, products[300001],                 invproducts[300001];   long long int power(long long int x, long long int n) {     if (n == 0)       return (long long)1;     else if (n % 2 == 0)       return power((x * x) % M, n / 2);     else       return (x * power((x * x) % M, (n - 1) / 2)) % M;   }   long long int cans(long long int p, long long int q) {     return ((p * power(q, M - 2)) % M + M) % M;   }   void build() {     products[0] = invproducts[0] = 1;     for (long long int i = 1; i <= n; i++) {       products[i] = (products[i - 1] * p[i]) % M;       invproducts[i] = cans(1, products[i]);     }     return;   }   long long int querry(long long int l, long long int r) {     return (products[r] * invproducts[l - 1]) % M;   }   long long int qvalue(long long int i, long long int j) {     long long int prod = querry(i, j);     long long int ans = (d[i - 1] * prod) % M;     ans = ((d[j] - ans) % M + M) % M;     return ans;   }   set<long long int> checkpoints;   void addcheckpoint(long long int id) {     checkpoints.insert(id);     auto it = checkpoints.find(id);     auto it1 = prev(it);     auto it2 = next(it);     fans = ((fans - qvalue(*it1, *it2 - 1)) % M + M) % M;     fans = (fans + qvalue(*it1, id - 1)) % M;     fans = (fans + qvalue(id, *it2 - 1)) % M;   }   void delcheckpoint(long long int id) {     auto it = checkpoints.find(id);     auto it1 = prev(it);     auto it2 = next(it);     fans = ((fans + qvalue(*it1, *it2 - 1)) % M + M) % M;     fans = ((fans - qvalue(*it1, id - 1)) % M + M) % M;     fans = ((fans - qvalue(id, *it2 - 1)) % M + M) % M;     checkpoints.erase(id);   }   int main() {     cin >> n >> q;     for (int i = 1; i <= n; i++) {       long long int pr;       cin >> pr;       p[i] = cans(100, pr);       d[i] = ((1 + d[i - 1]) * p[i]) % M;     }     build();     checkpoints.insert(1);     checkpoints.insert(n + 1);     fans = d[n];     while (q--) {       long long int quer;       cin >> quer;       if (checkpoints.find(quer) == checkpoints.end())         addcheckpoint(quer);       else         delcheckpoint(quer);       cout << fans << endl;     }     return 0;   }   