Problem: 2062C - Cirno and Operations
Language: C++23 (GCC 14-64, msys2)

Previous submission (verdict: Wrong answer on test 2):
/*
██████╗░███████╗██╗░░░░░██╗░░░░░░█████╗░  ░█████╗░██╗░█████╗░░█████╗░██╗
██╔══██╗██╔════╝██║░░░░░██║░░░░░██╔══██╗  ██╔══██╗██║██╔══██╗██╔══██╗██║
██████╦╝█████╗░░██║░░░░░██║░░░░░███████║  ██║░░╚═╝██║███████║██║░░██║██║
██╔══██╗██╔══╝░░██║░░░░░██║░░░░░██╔══██║  ██║░░██╗██║██╔══██║██║░░██║╚═╝
██████╦╝███████╗███████╗███████╗██║░░██║  ╚█████╔╝██║██║░░██║╚█████╔╝██╗
╚═════╝░╚══════╝╚══════╝╚══════╝╚═╝░░╚═╝  ░╚════╝░╚═╝╚═╝░░╚═╝░╚════╝░╚═╝
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef std::vector<ll> vll;
typedef std::vector<ld> vld;
typedef std::vector<std::vector<ll>> vvll;
typedef std::vector<std::vector<ld>> vvld;
typedef std::vector<string> vstr;
typedef std::vector<bool> vbl;
typedef std::vector<std::pair<ll,ll>> vpll;
typedef std::pair<ll,ll> pll;
#define f(i, x, n) for (ll i = x; i < n; ++i)
#define rf(i, x, n) for (ll i = x; i >= n; --i)
#define in(n) long long int n; cin >> n
#define instr(s) string s; cin >> s
#define inarr(n, arr) vector<ll> arr(n); f(i,0,n) cin >> arr[i]
#define input(vec,a,b) for(ll i_itr = a; i_itr < b; ++i_itr) cin >> vec[i_itr]
#define print(vec,a,b) for(ll i_itr = a; i_itr < b; ++i_itr) cout << vec[i_itr] << " "; cout << "\n"
#define ha cout << "YES" << endl
#define na cout << "NO" << endl
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
const ll mod = 1000000007;
const ll MOD = 998244353;
const long double pi = 3.14159265358979323846264338327950288419716939937510582097494459230;

void solve()
{
    in(n);
    inarr(n,v);
    ll ans=accumulate(all(v),0);
    while(v.size()>1)
    {
        vll temp(v.size()-1);
        f(i,0,v.size()-1)
        {
            temp[i]=v[i+1]-v[i];
        }
        swap(v,temp);
        ans=max(ans,abs((ll)accumulate(all(v),0)));
    }
    cout<<ans<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // cout << fixed << setprecision(15); ///activate it if the answers are in decimal.
    ll T = 1;
    cin >> T;
    while (T--)
    {
        solve();
    }
    return 0;
}

Submission (verdict: Wrong answer on test 2):
/*
██████╗░███████╗██╗░░░░░██╗░░░░░░█████╗░  ░█████╗░██╗░█████╗░░█████╗░██╗
██╔══██╗██╔════╝██║░░░░░██║░░░░░██╔══██╗  ██╔══██╗██║██╔══██╗██╔══██╗██║
██████╦╝█████╗░░██║░░░░░██║░░░░░███████║  ██║░░╚═╝██║███████║██║░░██║██║
██╔══██╗██╔══╝░░██║░░░░░██║░░░░░██╔══██║  ██║░░██╗██║██╔══██║██║░░██║╚═╝
██████╦╝███████╗███████╗███████╗██║░░██║  ╚█████╔╝██║██║░░██║╚█████╔╝██╗
╚═════╝░╚══════╝╚══════╝╚══════╝╚═╝░░╚═╝  ░╚════╝░╚═╝╚═╝░░╚═╝░╚════╝░╚═╝
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

typedef long long ll;
typedef long double ld;
typedef std::vector<ll> vll;
typedef std::vector<ld> vld;
typedef std::vector<std::vector<ll>> vvll;
typedef std::vector<std::vector<ld>> vvld;
typedef std::vector<string> vstr;
typedef std::vector<bool> vbl;
typedef std::vector<std::pair<ll,ll>> vpll;
typedef std::pair<ll,ll> pll;
#define f(i, x, n) for (ll i = x; i < n; ++i)
#define rf(i, x, n) for (ll i = x; i >= n; --i)
#define in(n) long long int n; cin >> n
#define instr(s) string s; cin >> s
#define inarr(n, arr) vector<ll> arr(n); f(i,0,n) cin >> arr[i]
#define input(vec,a,b) for(ll i_itr = a; i_itr < b; ++i_itr) cin >> vec[i_itr]
#define print(vec,a,b) for(ll i_itr = a; i_itr < b; ++i_itr) cout << vec[i_itr] << " "; cout << "\n"
#define ha cout << "YES" << endl
#define na cout << "NO" << endl
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
const ll mod = 1000000007;
const ll MOD = 998244353;
const long double pi = 3.14159265358979323846264338327950288419716939937510582097494459230;

void solve()
{
    in(n);
    inarr(n,v);
    ll ans=accumulate(all(v),0);
    while(v.size()>1)
    {
        vll temp(v.size()-1);
        f(i,0,v.size()-1)
        {
            temp[i]=v[i+1]-v[i];
        }
        swap(v,temp);
        ll sum=accumulate(all(v),0);
        ans=max(ans,abs(sum));
    }
    cout<<ans<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // cout << fixed << setprecision(15); ///activate it if the answers are in decimal.
    ll T = 1;
    cin >> T;
    while (T--)
    {
        solve();
    }
    return 0;
}