func_code_string: #include <bits/stdc++.h>   using namespace std;   const int mod = 998244353, kMaxP = 3000007, kMaxN = 200007, root = 15311432,             root_1 = 469870224, root_pw = 1 << 23;   long long binpow(long long a, long long b) {     a %= mod;     long long res = 1;     while (b > 0) {       if (b & 1) res = res * a % mod;       a = a * a % mod;       b >>= 1;     }     return res;   }   int inverse(int a) { return binpow(a, mod - 2); }   int counts[kMaxP];   vector<vector<int>> polynomials_of_degree[kMaxN];   void fft(vector<int>& a, bool invert) {     int n = a.size();     for (int i = 1, j = 0; i < n; i++) {       int bit = n >> 1;       for (; j & bit; bit >>= 1) j ^= bit;       j ^= bit;       if (i < j) swap(a[i], a[j]);     }     for (int len = 2; len <= n; len <<= 1) {       int wlen = invert ? root_1 : root;       for (int i = len; i < root_pw; i <<= 1)         wlen = (int)(1LL * wlen * wlen % mod);       for (int i = 0; i < n; i += len) {         int w = 1;         for (int j = 0; j < len / 2; j++) {           int u = a[i + j], v = (int)(1LL * a[i + j + len / 2] * w % mod);           a[i + j] = u + v < mod ? u + v : u + v - mod;           a[i + j + len / 2] = u - v >= 0 ? u - v : u - v + mod;           w = (int)(1LL * w * wlen % mod);         }       }     }     if (invert) {       int n_1 = inverse(n);       for (int& x : a) x = (int)(1LL * x * n_1 % mod);     }   }   vector<int> multiply(vector<int> const& a, vector<int> const& b) {     vector<int> fa(a.begin(), a.end()), fb(b.begin(), b.end());     ;     int n = 1;     while (n < (static_cast<int>((a).size())) + (static_cast<int>((b).size())))       n <<= 1;     fa.resize(n);     fb.resize(n);     fft(fa, false);     fft(fb, false);     for (int i = 0; i < n; i++) fa[i] = int64_t{1} * fa[i] * fb[i] % mod;     fft(fa, true);     fa.resize((static_cast<int>((a).size())) + (static_cast<int>((b).size())) -               1);     ;     return fa;   }   int solve() {     int n;     cin >> n;     for (int i = n; i--;) {       int p;       cin >> p;       counts[p]++;     }     for (int i = 2; i < kMaxP; i++) {       if (counts[i] > 0) {         vector<int> all_ones(counts[i] + 1, 1);         polynomials_of_degree[counts[i]].emplace_back(all_ones);         ;       }     }     for (int i = 1; true; i++) {       while (!polynomials_of_degree[i].empty()) {         vector<int> a = polynomials_of_degree[i].back();         polynomials_of_degree[i].pop_back();         vector<int> b;         for (int j = i; j < n; j++)           if (!polynomials_of_degree[j].empty()) {             b = polynomials_of_degree[j].back();             polynomials_of_degree[j].pop_back();             break;           }         if (b.empty()) return a[(n >> 1)];         polynomials_of_degree[(static_cast<int>((a).size())) - 1 +                               (static_cast<int>((b).size())) - 1]             .emplace_back(multiply(a, b));         ;       }     }   }   int main() {     ios_base::sync_with_stdio(0), cin.tie(0);     int test_cases_num = 1;     for (int i = 1; i <= test_cases_num; i++) {       if (false)         if (test_cases_num > 1)           if (false) cerr <<  Test #  << i <<  : n ;       cout << solve() <<   n ;       if (false)         if (test_cases_num > 1)           if (false) cerr <<  End of test #  << i <<  . n ;     }     return 0;   }   