func_code_string: #include <bits/stdc++.h>   using namespace std;   template <class T, class V>   ostream &operator<<(ostream &s, pair<T, V> a) {     s << a.first <<     << a.second;     return s;   }   struct NTT {     long long int MD, M = 1, R;     vector<int> r;     vector<long long int> w[2];     long long int bigmod(long long int a, long long int p, long long int m) {       long long int res = 1, x = a;       while (p) {         if (p & 1) res = (res * x) % m;         x = (x * x) % m;         p >>= 1;       }       return res;     }     long long int primitive_root(int n) {       int p = n - 1;       vector<int> d;       for (int i = 2; i * i <= p; i++) {         if (p % i == 0) {           d.push_back(i);           while (p % i == 0) p /= i;         }       }       if (p > 1) d.push_back(p);       for (int i = 2; i <= n; i++) {         bool ok = true;         for (auto x : d) ok &= (bigmod(i, (n - 1) / x, n) != 1);         if (ok) return i;       }       assert(false);     }     NTT(long long int n, long long int _MD) : MD(_MD) {       int u = 0;       while (M < n) M <<= 1, u++;       r.resize(M);       w[0].resize(M, 1);       w[1].resize(M, 1);       R = 3;       w[0][1] = bigmod(R, (MD - 1) / M, MD);       w[1][1] = bigmod(w[0][1], MD - 2, MD);       for (int i = 1; i < M; i++) {         int l = __builtin_ctz(i);         r[i] = r[i ^ (1 << l)] | (1 << (u - l - 1));         w[0][i] = w[0][i - 1] * w[0][1] % MD;         w[1][i] = w[1][i - 1] * w[1][1] % MD;       }     }     void fft(vector<long long int> &a, bool inv = false) {       for (int i = 0; i < M; i++)         if (i < r[i]) swap(a[i], a[r[i]]);       for (int len = 2; len <= M; len <<= 1) {         for (int i = 0, inc = M / len; i < M; i += len) {           for (int j = 0, l = 0; j < (len >> 1); j++, l += inc) {             long long int u = a[i + j],                           v = a[i + j + (len >> 1)] * w[inv][l] % MD;             a[i + j] = (u + v >= MD ? u + v - MD : u + v);             a[i + j + (len >> 1)] = (u < v ? u - v + MD : u - v);           }         }       }       if (inv) {         long long int r = bigmod(M, MD - 2, MD);         for (auto &x : a) x = x * r % MD;       }     }     vector<long long int> multiply(vector<long long int> &a,                                    vector<long long int> &b) {       vector<long long int> v1(M), v2(M);       for (int i = 0; i < a.size(); i++) v1[i] = a[i];       for (int i = 0; i < b.size(); i++) v2[i] = b[i];       fft(v1);       fft(v2);       for (int i = 0; i < M; i++) v1[i] = v1[i] * v2[i] % MD;       fft(v1, 1);       return v1;     }     vector<long long int> POWER(vector<long long int> &a, long long int n) {       vector<long long int> v1(M);       for (int i = 0; i < a.size(); i++) v1[i] = a[i];       fft(v1);       for (int i = 0; i < M; i++) v1[i] = bigmod(v1[i], n, MD);       fft(v1, 1);       return v1;     }   };   int main() {     ios::sync_with_stdio(false);     cin.tie(NULL);     int T = 1;     for (int qq = 1; qq <= T; qq++) {       int n, k;       cin >> n >> k;       vector<long long int> v(10);       while (k--) {         long long int x;         cin >> x;         v[x] = 1;       }       long long int u = n / 2;       NTT nt(1 << 20, (998244353));       v = nt.POWER(v, u);       long long int a = 0;       for (int i = 0; i < v.size(); i++) a = (v[i] * v[i] + a) % (998244353);       cout << a << endl;     }   }   