func_code_string: #include <bits/stdc++.h>   using namespace std;   long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }   long long power(long long x, long long p) {     if (p == 0) return 1;     if (p == 1) return x;     if (p % 2) return x * power(x, p - 1);     long long y = power(x, p / 2);     return y * y;   }   void solve() {     long long n;     cin >> n;     long long arr[n];     for (int i = 0; i < n; i++) {       cin >> arr[i];     }     pair<long long, long long> modd, meven;     long long odd = 0, even = 0, l = -1, r = -1, res = 0;     for (int i = 0; i < n; i++) {       if (i % 2)         odd += arr[i];       else         even += arr[i];       long long cur = odd - even;       pair<long long, long long> p;       if (i % 2)         p = meven;       else         p = modd;       long long val = cur - p.first;       if (val > res) {         l = p.second;         r = i;         res = val;       }       long long x = odd - even + arr[i] * (i % 2 ? -1 : 1);       if (i % 2 == 0) {         if (x < meven.first) meven = make_pair(x, i);       } else {         if (x < modd.first) modd = make_pair(x, i);       }     }     if (l != -1) {       for (int i = 0; i < (r - l + 1) / 2; i++) {         swap(arr[l + i], arr[r - i]);       }     }     odd = 0;     even = 0;     for (int i = 0; i < n; i++) {       if (i % 2)         odd += arr[i];       else         even += arr[i];     }     cout << max(odd, even) << endl;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int t;     cin >> t;     while (t--) solve();   }   