Problem: 2062C - Cirno and Operations
Language: c++23 

Code 1:
/*
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................##..............................
..........................................#########.............................
.........................................##########.............................
........................................###########.............................
....................................################............................
......................................##############............................
......................................###############...........................
.....................................#################..........................
.....................................################...........................
......................................###############...........................
.......................................#############............................
.......................................############.............................
........................................###########.............................
........................................###########.............................
..............................####......##############..........................
............................#######....################.........................
..........................##############################........................
.........................################################.......................
.........................#################################......................
.........................################################.......................
.........................###############################........................
...........................#######.#####################........................
....................................####################........................
.....................................###################........................
......................................###################.......................
......................................###################.......................
......................................###################.......................
......................................##############..##........................
.....................................###############............................
.....................................###############............................
......................................###############...........................
...................................#..###############...........................
......................................###############...........................
......................................###############...........................
......................................###############...........................
......................................###############...........................
......................................###############...........................
.......................................###############..........................
.......................................###############..........................
.......................................###############..........................
.......................................###############..........................
.......................................###############..........................
.......................................###############..........................
.......................................###############..........................
.......................................################.........................
.......................................################.........................
.......................................################.........................
.......................................################.........................
.......................................################.........................
.......................................################.........................
......................................##################........................
......................................##################........................
......................................##################........................
......................................##################........................
......................................##################........................
*/

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

void check () {
    int n = 0;
    cin >> n;

    vector <long long> v (n);
    for (int i = 1; i <= n; i++)
        cin >> v[i - 1];
    
    long long ansmax = 0;
    while (true) {
        long long sum = 0;
        for (long long& e : v)
            sum += e;

        if (v.size() < n)
            ansmax = max (ansmax, abs (sum));
        else
            ansmax = sum;

        vector <long long> v1 (v.size() - 1);
        for (int i = 1; i < v.size(); i++)
            v1[i - 1] = v[i] - v[i - 1];

        if (v1.size() == 0)
            break;
        v = v1;
    }

    cout << ansmax << '\n';
}

int main () {
    ios::sync_with_stdio(false);
    cin.tie (0);
    cout.tie (0);

    int t = 0;
    cin >> t;

    while (t--)
        check ();
}

Code 2:
/*
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................#...............................
..........................................######.#..............................
.........................................##########.............................
......................................#############.............................
.......................................############.............................
.......................................#############............................
.......................................##############...........................
......................................################..........................
.......................................##############...........................
.......................................#############............................
........................................###########.............................
........................................##########..............................
........................................##########..............................
.......................................#############............................
.......................................##############...........................
.......................................################.........................
.......................................#################........................
......................................##################........................
......................................#################.........................
......................................################..........................
......................................################..........................
.......................................################.........................
.......................................################.........................
.......................................#################........................
.......................................################.........................
.......................................############..#..........................
......................................##############............................
......................................##############............................
.......................................#############............................
.......................................############.............................
.......................................############.............................
.......................................############.............................
.......................................############.............................
.......................................############.............................
.......................................############.............................
.......................................############.............................
.......................................#############............................
.......................................#############............................
.......................................#############............................
.......................................#############............................
......................................##############............................
......................................##############............................
......................................###############...........................
......................................###############...........................
......................................###############...........................
......................................###############...........................
......................................################..........................
......................................################..........................
......................................################..........................
......................................################..........................
......................................################..........................
......................................################..........................
......................................#################.........................
......................................#################.........................
.....................................##################.........................
*/

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

void check () {
    int n = 0;
    cin >> n;

    vector <int> v (n);
    for (int i = 1; i <= n; i++)
        cin >> v[i - 1];
    
    int ansmax = 0;
    while (true) {
        int sum = 0;
        for (int& e : v)
            sum += e;

        if (v.size() < n)
            ansmax = max (ansmax, abs (sum));
        else
            ansmax = sum;

        vector <int> v1 (v.size() - 1);
        for (int i = 1; i < v.size(); i++)
            v1[i - 1] = v[i] - v[i - 1];

        if (v1.size() == 0)
            break;
        v = v1;
    }

    cout << ansmax << '\n';
}

int main () {
    ios::sync_with_stdio(false);
    cin.tie (0);
    cout.tie (0);

    int t = 0;
    cin >> t;

    while (t--)
        check ();
}

Answer: 1