ShaysXIA/CodeInsightBench huggingface dataset:
Problem: 2063B - Subsequence Update
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 8):
#include <bits/stdc++.h>

using namespace std;



int main() {

    int t;

    cin >> t;

    while (t--) {

        int n, l, r;

        cin >> n >> l >> r;

        vector<int> v(n);

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

            cin >> v[i];

        }

        l--;

      

        vector<int> u(v.begin() + l, v.end());

        sort(v.begin(), v.begin()+r);

        sort(u.begin(), u.end());



        long long sum_w = accumulate(v.begin(), v.begin() + r-l , 0);

        long long sum_u = accumulate(u.begin(), u.begin() + r - l, 0);



        cout << min(sum_w, sum_u) << endl;

    }

    return 0;

}



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

using namespace std;



int main() {

    int t;

    cin >> t;

    while (t--) {

        int n, l, r;

        cin >> n >> l >> r;

        vector<long long> v(n);

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

            cin >> v[i];

        }

        l--;

      

        vector<long long> u(v.begin() + l, v.end());

        sort(v.begin(), v.begin()+r);

        sort(u.begin(), u.end());



        long long sum_w = accumulate(v.begin(), v.begin() + r-l , 0);

        long long sum_u = accumulate(u.begin(), u.begin() + r - l, 0);



        cout << min(sum_w, sum_u) << endl;

    }

    return 0;

}
Problem: 2049C - MEX Cycle
Language: C++20 (GCC 13-64)


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

using namespace std;

#define ll long long

#define vl vector<ll>



void solve()

{

    int n, m,o;

    cin >> n >> m>>o;

    vector<ll> temp(n,-1);

    temp[0]=0;

    temp[o-m]=1;

    for(int i=1;i<n-1;i++)

    {

        if(i==o-m)continue;

        if(temp[i-1]==0&&temp[i+1]==-1)

        {

            temp[i]=1;

        }

        else if(temp[i-1]==1&&temp[i+1]==-1)

        {

            temp[i]=0;

        }

        else if(temp[i-1]==0&&temp[i+1]==1)

        {

            temp[i]=2;

        }

        else 

        {

            temp[i]=0;

        }

        

    }

    if(n-1!=o-m)

    {

        if(temp[n-2]==0&&temp[0]==1)

        {

            temp[n-1]=2;

        }

       else if(temp[n-2]==1&&temp[0]==0)

        {

            temp[n-1]=2;

        }

        else if(temp[n-2]==2&&temp[0]==1||temp[n-2]==1&&temp[0]==2)

        {

            temp[n-1]=0;

        }  

        else if(temp[n-2]==2&&temp[0]==0||temp[n-2]==0&&temp[0]==2)

        {

            temp[n-1]=1;

        }

        else if(temp[n-2]==0&&temp[0]==0)

        {

            temp[n-1]=1;

        }

        else

        temp[n-1]=0;

        

    }

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

    {

        cout<<temp[(i+(n-m))%n]<<" ";

    }

    cout << endl;

}



int main()

{

    int t; // Number of test cases

    cin >> t;

    while (t--)

    {

        solve();

    }

}
Problem: 2049C - MEX Cycle
Language: C++20 (GCC 13-64)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>

using namespace std;

#define ll long long

#define vl vector<ll>



void solve()

{

    int n, m,o;

    cin >> n >> m>>o;

    vector<ll> temp(n,-1);

    temp[0]=0;

    temp[o-m]=1;

    for(int i=1;i<n-1;i++)

    {

        if(i==o-m)continue;

        if(temp[i-1]==0&&temp[i+1]==-1)

        {

            temp[i]=1;

        }

        else if(temp[i-1]==1&&temp[i+1]==-1)

        {

            temp[i]=0;

        }

        else if(temp[i-1]==0&&temp[i+1]==1)

        {

            temp[i]=2;

        }

        else 

        {

            temp[i]=0;

        }

        

    }

    if(n-1!=o-m)

    {

        if(temp[n-2]==0&&temp[0]==1)

        {

            temp[n-1]=2;

        }

       else if(temp[n-2]==1&&temp[0]==0)

        {

            temp[n-1]=2;

        }

        else if(temp[n-2]==2&&temp[0]==1||temp[n-2]==1&&temp[0]==2)

        {

            temp[n-1]=0;

        }  

        else if(temp[n-2]==2&&temp[0]==0||temp[n-2]==0&&temp[0]==2)

        {

            temp[n-1]=1;

        }

        else if(temp[n-2]==0&&temp[0]==0)

        {

            temp[n-1]=1;

        }

        else

        temp[n-1]=0;

        

    }

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

    {

        cout<<temp[(i+(n-m))%n]<<" ";

    }

    cout << endl;

}



int main()

{

    int t; // Number of test cases

    cin >> t;

    while (t--)

    {

        solve();

    }

}



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

using namespace std;

#define ll long long

#define vl vector<ll>



void solve()

{

    int n, m,o;

    cin >> n >> m>>o;

    vector<ll> temp(n+1,-1);

    temp[0]=0;

    temp[n]=0;

    for(int i=1;i<n;i++)

    {

       if(temp[i]==-1)

       {

           if(temp[i-1]==0&&temp[i+1]==0)

           temp[i]=1;

           else if(temp[i-1]==1&&temp[i+1]==0)

           temp[i]=2;

           else if(temp[i-1]==0&&temp[i+1]==1)

           temp[i]=2;

           else if(temp[i-1]==0&&temp[i+1]==-1)

           temp[i]=1;

           else

           temp[i]=0;

       }

        

    }

        

    

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

    {

        cout<<temp[(i+(n-m))%n]<<" ";

    }

    cout<<endl;

}



int main()

{

    int t; // Number of test cases

    cin >> t;

    while (t--)

    {

        solve();

    }

}
Problem: 2049C - MEX Cycle
Language: C++20 (GCC 13-64)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>

using namespace std;

#define ll long long

#define vl vector<ll>



void solve()

{

    int n, m,o;

    cin >> n >> m>>o;

    vector<ll> temp(n+1,-1);

    temp[0]=0;

    temp[n]=0;

    for(int i=1;i<n;i++)

    {

       if(temp[i]==-1)

       {

           if(temp[i-1]==0&&temp[i+1]==0)

           temp[i]=1;

           else if(temp[i-1]==1&&temp[i+1]==0)

           temp[i]=2;

           else if(temp[i-1]==0&&temp[i+1]==1)

           temp[i]=2;

           else if(temp[i-1]==0&&temp[i+1]==-1)

           temp[i]=1;

           else

           temp[i]=0;

       }

        

    }

        

    

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

    {

        cout<<temp[(i+(n-m))%n]<<" ";

    }

    cout<<endl;

}



int main()

{

    int t; // Number of test cases

    cin >> t;

    while (t--)

    {

        solve();

    }

}



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

using namespace std;

#define ll long long

#define vl vector<ll>



void solve()

{

   int n,x,y;

   cin>>n>>x>>y;

   vl temp(n,-1);

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

   {

       temp[(i+x)%n]=i%2;

   }

   if(n%2==1||(x-y)%2==0)

   temp[x]=2;

   for(auto it:temp)

   cout<<it<<" ";

   cout<<endl;

}



int main()

{

    int t; // Number of test cases

    cin >> t;

    while (t--)

    {

        solve();

    }

}
Problem: 2049C - MEX Cycle
Language: C++20 (GCC 13-64)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>

using namespace std;

#define ll long long

#define vl vector<ll>



void solve()

{

   int n,x,y;

   cin>>n>>x>>y;

   vl temp(n,-1);

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

   {

       temp[(i+x)%n]=i%2;

   }

   if(n%2==1||(x-y)%2==0)

   temp[x]=2;

   for(auto it:temp)

   cout<<it<<" ";

   cout<<endl;

}



int main()

{

    int t; // Number of test cases

    cin >> t;

    while (t--)

    {

        solve();

    }

}



Submission (verdict: Accepted):
#include <bits/stdc++.h>

using namespace std;

#define ll long long

#define vl vector<ll>



void solve()

{

   int n,x,y;

   cin>>n>>x>>y;

   x--;

   y--;

   vl temp(n,-1);

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

   {

       temp[(i+x)%n]=i%2;

   }

   if(n%2==1||(x-y)%2==0)

   temp[x]=2;

   for(auto it:temp)

   cout<<it<<" ";

   cout<<endl;

}



int main()

{

    int t; // Number of test cases

    cin >> t;

    while (t--)

    {

        solve();

    }

}
Problem: 2060D - Subtract Min Sort
Language: C++20 (GCC 13-64)


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

using ll = long long;
#define ull unsigned long long
#define int long long
const ll M = 1e9 + 7;

#define rep(i, a, b) for (int i = a; i < b; i++)
#define pb push_back
#define mp make_pair

void fastio()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

#define yes cout << "YES\n";
#define no cout << "NO\n";
#define nl cout << "\n";

#define vl vector<int>
#define pr pair<int, int>
#define us unordered_set<int>
#define ump unordered_map<int, int>

bool compareByFirstElement(const std::pair<int, int> &a, const std::pair<int, int> &b)
{
    return a.first < b.first;
}

bool isPrime(int n)
{
    if (n <= 1)
    {
        return false; // Numbers less than or equal to 1 are not prime
    }
    if (n <= 3)
    {
        return true; // 2 and 3 are prime numbers
    }
    if (n % 2 == 0 || n % 3 == 0)
    {
        return false; // Multiples of 2 and 3 are not prime
    }

    // Check divisibility from 5 to sqrt(n)
    for (int i = 5; i * i <= n; i += 6)
    {
        if (n % i == 0 || n % (i + 2) == 0)
        {
            return false; // Found a divisor, so not prime
        }
    }
    return true; // No divisors found, number is prime
}
/*----------------------------------MAINCODE------------------------------------*/
void solve()
{
    int n;
    cin>>n;
    vl v;
    rep(i,0,n){
        int a;
        cin>>a;
        v.pb(a);
    }
    bool an=true;
    rep(j,2,n){
        int diff=v[j]-v[j-1];
        int diff2=v[j-1]-v[j-2];
        if(diff<0&&diff2<0){
            an=false;
            break;
        }
    }
    if(an){
        yes
    }
    else{
        no
    }
}

int32_t main()
{
    fastio();
    int T = 1LL;
    cin >> T;
    while (T--)
    {
        solve();
    }
    return 0;
}
Problem: 2050E - Three Strings
Language: C++20 (GCC 13-64)

Previous submission (verdict: Time limit exceeded on test 16):
#include <bits/stdc++.h>
#define ll long long int
using namespace std;

signed main()
{
    ll t1;
    cin >> t1;
    while (t1--)
    {
        string a, b, c;
        cin >> a >> b >> c;

        ll n = a.size(), m = b.size(), d = c.size();
        vector<vector<ll>> next(n + 1, vector<ll>(m + 1, 0));

        for (ll k = d - 1; k >= 0; k--)
        {
            vector<vector<ll>> curr(n + 1, vector<ll>(m + 1, 1e9));
            for (ll i = n; i >= 0; i--)
            {
                for (ll j = m; j >= 0; j--)
                {
                    ll res = 1e9;
                    if (i < n && a[i] == c[k])
                    {
                        res = min(res, next[i + 1][j]);
                    }
                    else if (i < n)
                    {
                        res = min(res, 1 + next[i + 1][j]);
                    }
                    if (j < m && b[j] == c[k])
                    {
                        res = min(res, next[i][j + 1]);
                    }
                    else if (j < m)
                    {
                        res = min(res, 1 + next[i][j + 1]);
                    }

                    curr[i][j] = res;
                }
            }
            next = curr;
        }

        cout << next[0][0] << endl;
    }
    return 0;
}

Submission (verdict: Accepted):
#include <bits/stdc++.h>
#define ll long long int
using namespace std;

signed main()
{
    ll t1;
    cin >> t1;
    while (t1--)
    {
        string a, b, c;
        cin >> a >> b >> c;

        ll n = a.size(), m = b.size();
        vector<vector<ll>> dp(n + 1, vector<ll>(m + 1, 1e9));

        dp[0][0] = 0;

        for (ll i = 0; i <= n; i++)
        {
            for (ll j = 0; j <= m; j++)
            {
                ll k = i + j;

                if (k < c.size())
                {
                    if (i < n)
                    {
                        if (a[i] == c[k])
                        {
                            dp[i + 1][j] = min(dp[i + 1][j], dp[i][j]);
                        }
                        else
                        {
                            dp[i + 1][j] = min(dp[i + 1][j], dp[i][j] + 1);
                        }
                    }
                    if (j < m)
                    {
                        if (b[j] == c[k])
                        {
                            dp[i][j + 1] = min(dp[i][j + 1], dp[i][j]);
                        }
                        else
                        {
                            dp[i][j + 1] = min(dp[i][j + 1], dp[i][j] + 1);
                        }
                    }
                }
            }
        }
        cout << dp[n][m] << endl;
    }
    return 0;
}
Problem: 2050E - Three Strings
Language: C++20 (GCC 13-64)

Previous submission (verdict: Memory limit exceeded on test 14):
#include <bits/stdc++.h>
#define ll long long int
using namespace std;

signed main()
{
    ll t1;
    cin >> t1;
    while (t1--)
    {
        string a, b, c;
        cin >> a >> b >> c;

        ll n = a.size(), m = b.size(), d = c.size();
        vector<vector<vector<ll>>> dp(n + 1, vector<vector<ll>>(m + 1, vector<ll>(d + 1, LONG_MAX)));
        for (ll i = 0; i <= n; i++)
        {
            for (ll j = 0; j <= m; j++)
            {
                dp[i][j][d] = 0;
            }
        }
        for (ll k = d - 1; k >= 0; k--)
        {
            for (ll i = n; i >= 0; i--)
            {
                for (ll j = m; j >= 0; j--)
                {
                    ll res = LONG_MAX;
                    if (i < n && a[i] == c[k])
                    {
                        res = min(res, dp[i + 1][j][k + 1]);
                    }
                    else if (i < n)
                    {
                        res = min(res, 1 + dp[i + 1][j][k + 1]);
                    }
                    if (j < m && b[j] == c[k])
                    {
                        res = min(res, dp[i][j + 1][k + 1]);
                    }
                    else if (j < m)
                    {
                        res = min(res, 1 + dp[i][j + 1][k + 1]);
                    }

                    dp[i][j][k] = res;
                }
            }
        }
        cout << dp[0][0][0] << endl;
    }
    return 0;
}


Submission (verdict: Time limit exceeded on test 16):
#include <bits/stdc++.h>
#define ll long long int
using namespace std;

signed main()
{
    ll t1;
    cin >> t1;
    while (t1--)
    {
        string a, b, c;
        cin >> a >> b >> c;

        ll n = a.size(), m = b.size(), d = c.size();
        vector<vector<ll>> next(n + 1, vector<ll>(m + 1, 0));

        for (ll k = d - 1; k >= 0; k--)
        {
            vector<vector<ll>> curr(n + 1, vector<ll>(m + 1, 1e9));
            for (ll i = n; i >= 0; i--)
            {
                for (ll j = m; j >= 0; j--)
                {
                    ll res = 1e9;
                    if (i < n && a[i] == c[k])
                    {
                        res = min(res, next[i + 1][j]);
                    }
                    else if (i < n)
                    {
                        res = min(res, 1 + next[i + 1][j]);
                    }
                    if (j < m && b[j] == c[k])
                    {
                        res = min(res, next[i][j + 1]);
                    }
                    else if (j < m)
                    {
                        res = min(res, 1 + next[i][j + 1]);
                    }

                    curr[i][j] = res;
                }
            }
            next = curr;
        }

        cout << next[0][0] << endl;
    }
    return 0;
}
Problem: 2050E - Three Strings
Language: C++20 (GCC 13-64)


Submission (verdict: Memory limit exceeded on test 14):
#include <bits/stdc++.h>
#define ll long long int
using namespace std;

signed main()
{
    ll t1;
    cin >> t1;
    while (t1--)
    {
        string a, b, c;
        cin >> a >> b >> c;

        ll n = a.size(), m = b.size(), d = c.size();
        vector<vector<vector<ll>>> dp(n + 1, vector<vector<ll>>(m + 1, vector<ll>(d + 1, LONG_MAX)));
        for (ll i = 0; i <= n; i++)
        {
            for (ll j = 0; j <= m; j++)
            {
                dp[i][j][d] = 0;
            }
        }
        for (ll k = d - 1; k >= 0; k--)
        {
            for (ll i = n; i >= 0; i--)
            {
                for (ll j = m; j >= 0; j--)
                {
                    ll res = LONG_MAX;
                    if (i < n && a[i] == c[k])
                    {
                        res = min(res, dp[i + 1][j][k + 1]);
                    }
                    else if (i < n)
                    {
                        res = min(res, 1 + dp[i + 1][j][k + 1]);
                    }
                    if (j < m && b[j] == c[k])
                    {
                        res = min(res, dp[i][j + 1][k + 1]);
                    }
                    else if (j < m)
                    {
                        res = min(res, 1 + dp[i][j + 1][k + 1]);
                    }

                    dp[i][j][k] = res;
                }
            }
        }
        cout << dp[0][0][0] << endl;
    }
    return 0;
}
Problem: 2063B - Subsequence Update
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 2):
#include <iostream>

#include <vector>

#include <queue>

#include <stack>

#include <algorithm>

#include <climits>

#include <set>

#include <map>

#include <cstring>

#include <string>

#include <cmath>

#include <cstring>

using namespace std;

typedef long long ll;



ll n, m, k, l, r;



int main() {

	ios_base::sync_with_stdio(0);

	cin.tie(0);	cout.tie(0);

	int T; cin >> T;

	while (T--) {

		vector<ll> v;

		cin >> n >> l >> r;

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

			ll input; cin >> input;

			v.push_back(input);

		}



		sort(v.begin(), v.end());



		ll tmp = r - l + 1, res = 0;

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

			res += v[i];

		}



		cout << res << '\n';

	}

}

Submission (verdict: Wrong answer on test 2):
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <climits>
#include <set>
#include <map>
#include <cstring>
#include <string>
#include <cmath>
#include <cstring>
using namespace std;
typedef long long ll;

ll n, m, k, l, r;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);	cout.tie(0);
	int T; cin >> T;
	while (T--) {
		vector<ll> v, rv, lv, mv;
		cin >> n >> l >> r; l--; r--;
		for (int i = 0; i < n; i++) {
			ll input; cin >> input;
			v.push_back(input);
		}

		for (int i = 0; i < l; i++) {
			lv.push_back(v[i]);
		}
		for (int i = l; i <= r; i++) {
			mv.push_back(v[i]);
		}
		for (int i = r + 1; i < n; i++) {
			rv.push_back(v[i]);
		}

		sort(lv.begin(), lv.end());
		sort(mv.rbegin(), mv.rend());
		sort(rv.begin(), rv.end());

		ll res = 0, a = 0;
		for (auto ele : mv) a += ele;

		res = a;

		ll tmp = a;
		for (int i = 0; i < lv.size(); i++) {
			if (lv[i] > mv[i]) break;

			tmp = tmp - mv[i] + lv[i];
		}
		res = min(res, tmp);

		tmp = a;
		for (int i = 0; i < rv.size(); i++) {
			if (rv[i] > mv[i]) break;

			tmp = tmp - mv[i] + rv[i];
		}
		res = min(res, tmp);

		cout << res << '\n';
	}
}
Problem: 2063B - Subsequence Update
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 2):
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <climits>
#include <set>
#include <map>
#include <cstring>
#include <string>
#include <cmath>
#include <cstring>
using namespace std;
typedef long long ll;

ll n, m, k, l, r;

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);	cout.tie(0);
	int T; cin >> T;
	while (T--) {
		vector<ll> v, rv, lv, mv;
		cin >> n >> l >> r; l--; r--;
		for (int i = 0; i < n; i++) {
			ll input; cin >> input;
			v.push_back(input);
		}

		for (int i = 0; i < l; i++) {
			lv.push_back(v[i]);
		}
		for (int i = l; i <= r; i++) {
			mv.push_back(v[i]);
		}
		for (int i = r + 1; i < n; i++) {
			rv.push_back(v[i]);
		}

		sort(lv.begin(), lv.end());
		sort(mv.rbegin(), mv.rend());
		sort(rv.begin(), rv.end());

		ll res = 0, a = 0;
		for (auto ele : mv) a += ele;

		res = a;

		ll tmp = a;
		for (int i = 0; i < lv.size(); i++) {
			if (lv[i] > mv[i]) break;

			tmp = tmp - mv[i] + lv[i];
		}
		res = min(res, tmp);

		tmp = a;
		for (int i = 0; i < rv.size(); i++) {
			if (rv[i] > mv[i]) break;

			tmp = tmp - mv[i] + rv[i];
		}
		res = min(res, tmp);

		cout << res << '\n';
	}
}

Submission (verdict: Accepted):
#include <iostream>

#include <vector>

#include <queue>

#include <stack>

#include <algorithm>

#include <climits>

#include <set>

#include <map>

#include <cstring>

#include <string>

#include <cmath>

#include <cstring>

using namespace std;

typedef long long ll;



ll n, m, k, l, r;



int main() {

	ios_base::sync_with_stdio(0);

	cin.tie(0);	cout.tie(0);

	int T; cin >> T;

	while (T--) {

		vector<ll> v, rv, lv, mv;

		cin >> n >> l >> r; l--; r--;

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

			ll input; cin >> input;

			v.push_back(input);

		}



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

			lv.push_back(v[i]);

		}

		for (int i = l; i <= r; i++) {

			mv.push_back(v[i]);

		}

		for (int i = r + 1; i < n; i++) {

			rv.push_back(v[i]);

		}



		sort(lv.begin(), lv.end());

		sort(mv.rbegin(), mv.rend());

		sort(rv.begin(), rv.end());



		ll res = 0, a = 0;

		for (auto ele : mv) a += ele;



		res = a;



		ll tmp = a;

		for (int i = 0; i < lv.size(); i++) {

			if (i > mv.size() - 1 || lv[i] > mv[i]) break;



			tmp = tmp - mv[i] + lv[i];

		}

		res = min(res, tmp);



		tmp = a;

		for (int i = 0; i < rv.size(); i++) {

			if (i > mv.size() - 1 || rv[i] > mv[i]) break;



			tmp = tmp - mv[i] + rv[i];

		}

		res = min(res, tmp);



		cout << res << '\n';

	}

}
Problem: 2063B - Subsequence Update
Language: C++17 (GCC 7-32)


Submission (verdict: Wrong answer on test 2):
#include <iostream>

#include <vector>

#include <queue>

#include <stack>

#include <algorithm>

#include <climits>

#include <set>

#include <map>

#include <cstring>

#include <string>

#include <cmath>

#include <cstring>

using namespace std;

typedef long long ll;



ll n, m, k, l, r;



int main() {

	ios_base::sync_with_stdio(0);

	cin.tie(0);	cout.tie(0);

	int T; cin >> T;

	while (T--) {

		vector<ll> v;

		cin >> n >> l >> r;

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

			ll input; cin >> input;

			v.push_back(input);

		}



		sort(v.begin(), v.end());



		ll tmp = r - l + 1, res = 0;

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

			res += v[i];

		}



		cout << res << '\n';

	}

}