Problem: 2063B - Subsequence Update
Language: C++20 (GCC 13-64)

Previous submission (verdict: Compilation error):
#include <bits/stdc++.h>



#ifdef TEPAMID

#define debug(x) cerr << #x << " = " << x << endl;

#define debug_v(v)            \

    {                         \

        cerr << #v << " = ";  \

        for (auto x : v)      \

            cerr << x << " "; \

        cerr << endl;         \

    }

#define debug_vp(v)                       \

    {                                     \

        cerr << #v << " = ";              \

        for (auto [x, y] : v)             \

            cerr << x << "," << y << " "; \

        cerr << endl;                     \

    }

#else

#define debug(x) 0;

#define debug_v(x) 0;

#define debug_vp(x) 0;

#endif // HOME



using namespace std;



// mt19937 rng(5);

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());



#define fo(i, n) for (int i = 0; i < n; ++i)

#define foback(i, n) for (int i = n - 1; i >= 0; --i)

#define fo1(i, n) for (int i = 1; i <= n; ++i)



#define all(x) x.begin(), x.end()

#define rall(x) x.rbegin(), x.rend()

#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())



typedef long long ll;



void fastio()

{

    ios::sync_with_stdio(false);

    cin.tie(0);

    cout.tie(0);

}



void one();





int main() {

    fastio();



    int t = 1;

// #ifdef TEPAMID

    cin >> t;

// #endif



    fo(TEST, t)

    {

        debug(TEST)

        one();

    }



    return 0;

}





void one () {

    int n;   cin >> n;

    int l,r; cin >> l >> r; l--;

    

    for(int i=0; i<n; i++) {

        cin >> a[i];

    }



    sort(all(a));



   ll ans=0;

for(int i=0; i<r-l; i++) ans += a[i];

cout << ans <<endl;



}





Submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>

#ifdef TEPAMID
#define debug(x) cerr << #x << " = " << x << endl;
#define debug_v(v)            \
    {                         \
        cerr << #v << " = ";  \
        for (auto x : v)      \
            cerr << x << " "; \
        cerr << endl;         \
    }
#define debug_vp(v)                       \
    {                                     \
        cerr << #v << " = ";              \
        for (auto [x, y] : v)             \
            cerr << x << "," << y << " "; \
        cerr << endl;                     \
    }
#else
#define debug(x) 0;
#define debug_v(x) 0;
#define debug_vp(x) 0;
#endif // HOME

using namespace std;

// mt19937 rng(5);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define fo(i, n) for (int i = 0; i < n; ++i)
#define foback(i, n) for (int i = n - 1; i >= 0; --i)
#define fo1(i, n) for (int i = 1; i <= n; ++i)

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define makeunique(x) sort(all(x)), (x).resize(unique(all(x)) - (x).begin())

typedef long long ll;

void fastio()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
}

void one();


int main() {
    fastio();

    int t = 1;
// #ifdef TEPAMID
    cin >> t;
// #endif

    fo(TEST, t)
    {
        debug(TEST)
        one();
    }

    return 0;
}


void one () {
    int n;   cin >> n;
    int l,r; cin >> l >> r; l--;
vector<ll> a(n);
    
    for(int i=0; i<n; i++) {
        cin >> a[i];
    }

    sort(all(a));

   ll ans=0;
for(int i=0; i<r-l; i++) ans += a[i];
cout << ans <<endl;

}