func_code_string: #include <bits/stdc++.h>   using namespace std;   template <typename TYPE>   void readint(TYPE &x) {     x = 0;     int f = 1;     char c;     for (c = getchar(); !isdigit(c); c = getchar())       if (c ==  - ) f = -1;     for (; isdigit(c); c = getchar()) x = x * 10 + c -  0 ;     x *= f;   }   void err(istream_iterator<string> it) {}   template <typename T, typename... Args>   void err(istream_iterator<string> it, T a, Args... args) {     cerr << *it <<   =   << a << endl;     err(++it, args...);   }   const long long MOD = 998244353LL, MAX = 3e5 + 5;   const int INF = 2e9;   int n;   long long ans;   long long a[MAX];   long long fc[MAX];   long long pot(long long x, long long y) {     if (!y) return 1LL;     if (y & 1)       return (x * pot(x, y - 1)) % MOD;     else {       long long k = pot(x, y / 2);       return (k * k) % MOD;     }   }   long long inv(long long t) { return pot(t, MOD - 2); }   void read(int w[], int n) {     for (long long i = 0; i < n; i++) {       cin >> w[i];     }   }   void solve() {     cin >> n;     fc[0] = 1LL;     for (long long i = 0; i < 2 * n; i++) cin >> a[i];     if (n == 1) {       cout << (a[1] - a[0]) * 2;       return;     }     sort(a, a + 2 * n);     for (long long i = 1; i < n * 2 + 1; i++) fc[i] = (fc[i - 1] * i) % MOD;     for (long long i = 0; i < n; i++) ans += (a[2 * n - 1 - i] - a[i]);     ans %= MOD;     {       string _s =  ans ;       replace(_s.begin(), _s.end(),  , ,    );       stringstream _ss(_s);       istream_iterator<string> _it(_ss);       err(_it, ans);     };     ans = (ans * (fc[n * 2])) % MOD;     ans *= inv((fc[n] * fc[n]) % MOD);     ans %= MOD;     ans %= MOD;     cout << ans;   }   int main() {     ios::sync_with_stdio(false);     cin.tie(nullptr);     solve();     return 0;   }   