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

Previous submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 10;
const int INF = 2e9;
int a[N];
void solve() {
	int n, l, r;
	scanf("%d%d%d", &n, &l, &r);
	for(int i = 1; i <= n; i++) {
		scanf("%d", &a[i]);
	}
	sort(a + 1, a + n + 1);
	ll ans = 0;
	for(int i = 1; i <= r - l + 1; i++) {
		ans += a[i];
	}
	printf("%lld\n", ans);
}
int main() {
	// freopen("1.in", "r", stdin);
	// freopen("1.out", "w", stdout);
    int T = 1;
	scanf("%d", &T);
	while(T--) solve();

    return 0;
}

Submission (verdict: Wrong answer on test 2):
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 10;
const int INF = 2e9;
int a[N];
void solve() {
	int n, l, r;
	ll sum = 0;
	scanf("%d%d%d", &n, &l, &r);
	for(int i = 1; i <= n; i++) {
		scanf("%d", &a[i]);
	}
	for(int i = l; i <= r; i++) {
		sum += a[i];
	}
	sort(a + 1, a + n + 1);
	ll ans = 0;
	for(int i = 1; i <= r - l + 1; i++) {
		ans += a[i];
	}
	if(ans == sum && r - l + 1 < n) {
		ans += a[r - l + 2] - a[r - l + 1];
	}
	printf("%lld\n", ans);
}
int main() {
	// freopen("1.in", "r", stdin);
	// freopen("1.out", "w", stdout);
    int T = 1;
	scanf("%d", &T);
	while(T--) solve();

    return 0;
}
Problem: 2050D - Digital string maximization
Language: C++17 (GCC 7-32)

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

signed main()
{
     int t;
     cin >> t;

     for (int _ = 0; _ < t; _++){
          string x;
          cin >> x;
          int l = x.size();
          int n[l];
          for (int i = 0; i < l; i++){ n[i] = x[i] - '0'; }

          bool maximized = false;
          
          while(!maximized){
               for (int f = 0; f < l; f++){
                    int bestV = n[f];
                    int bestVpos = f;

                    for (int i = f+1; (i < l && i < f + (8 - n[f])); i++){
                         int aux = n[i] - (i - f);
                         if(aux > bestV){
                              bestV = aux;
                              bestVpos = i;
                         }
                    }
                    for (int i = bestVpos; i > f; i--){ n[i] = n[i-1]; }
                    n[f] = bestV;
               }
               
               maximized = true;
               for (int i = 0; i < l - 1; i++){
                    if((n[i+1] - n[i]) > 1){
                         maximized = false;
                         break;
                    }
               }
          }
          
          for (int i = 0; i < l; i++){ cout << n[i]; }
          cout << endl;
     }
}

/*
1
5891917899
*/

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

signed main()
{
     int t;
     cin >> t;

     for (int _ = 0; _ < t; _++){
          string x;
          cin >> x;
          int l = x.size();
          int n[l];
          for (int i = 0; i < l; i++){ n[i] = x[i] - '0'; }

          for (int f = 0; f < l; f++){
               int bestV = n[f];
               int bestVpos = f;

               for (int i = f+1; (i < l && i <= (f + (8 - n[f]))); i++){
                    int aux = n[i] - (i - f);
                    if(aux > bestV){
                         bestV = aux;
                         bestVpos = i;
                    }
               }
               for (int i = bestVpos; i > f; i--){ n[i] = n[i-1]; }
               n[f] = bestV;
          }
          
          for (int i = 0; i < l; i++){ cout << n[i]; }
          cout << endl;
     }
}

/*
1
5891917899
*/
Problem: 2050D - Digital string maximization
Language: C++17 (GCC 7-32)


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

signed main()
{
     int t;
     cin >> t;

     for (int _ = 0; _ < t; _++){
          string x;
          cin >> x;
          int l = x.size();
          int n[l];
          for (int i = 0; i < l; i++){ n[i] = x[i] - '0'; }

          bool maximized = false;
          
          while(!maximized){
               for (int f = 0; f < l; f++){
                    int bestV = n[f];
                    int bestVpos = f;

                    for (int i = f+1; (i < l && i < f + (8 - n[f])); i++){
                         int aux = n[i] - (i - f);
                         if(aux > bestV){
                              bestV = aux;
                              bestVpos = i;
                         }
                    }
                    for (int i = bestVpos; i > f; i--){ n[i] = n[i-1]; }
                    n[f] = bestV;
               }
               
               maximized = true;
               for (int i = 0; i < l; i++){
                    if((n[i+1] - n[i]) > 1){
                         maximized = false;
                         break;
                    }
               }
          }
          
          for (int i = 0; i < l; i++){ cout << n[i]; }
          cout << endl;
     }
}

/*
1
5891917899
*/
Problem: 2050D - Digital string maximization
Language: C++17 (GCC 7-32)

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

signed main()
{
     int t;
     cin >> t;

     for (int _ = 0; _ < t; _++){
          string x;
          cin >> x;
          int l = x.size();
          int n[l];
          for (int i = 0; i < l; i++){ n[i] = x[i] - '0'; }

          bool maximized = false;
          
          while(!maximized){
               for (int f = 0; f < l; f++){
                    int bestV = n[f];
                    int bestVpos = f;

                    for (int i = f+1; (i < l && i < f + (8 - n[f])); i++){
                         int aux = n[i] - (i - f);
                         if(aux > bestV){
                              bestV = aux;
                              bestVpos = i;
                         }
                    }
                    for (int i = bestVpos; i > f; i--){ n[i] = n[i-1]; }
                    n[f] = bestV;
               }
               
               maximized = true;
               for (int i = 0; i < l; i++){
                    if((n[i+1] - n[i]) > 1){
                         maximized = false;
                         break;
                    }
               }
          }
          
          for (int i = 0; i < l; i++){ cout << n[i]; }
          cout << endl;
     }
}

/*
1
5891917899
*/

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

signed main()
{
     int t;
     cin >> t;

     for (int _ = 0; _ < t; _++){
          string x;
          cin >> x;
          int l = x.size();
          int n[l];
          for (int i = 0; i < l; i++){ n[i] = x[i] - '0'; }

          bool maximized = false;
          
          while(!maximized){
               for (int f = 0; f < l; f++){
                    int bestV = n[f];
                    int bestVpos = f;

                    for (int i = f+1; (i < l && i < f + (8 - n[f])); i++){
                         int aux = n[i] - (i - f);
                         if(aux > bestV){
                              bestV = aux;
                              bestVpos = i;
                         }
                    }
                    for (int i = bestVpos; i > f; i--){ n[i] = n[i-1]; }
                    n[f] = bestV;
               }
               
               maximized = true;
               for (int i = 0; i < l - 1; i++){
                    if((n[i+1] - n[i]) > 1){
                         maximized = false;
                         break;
                    }
               }
          }
          
          for (int i = 0; i < l; i++){ cout << n[i]; }
          cout << endl;
     }
}

/*
1
5891917899
*/
Problem: 2063C - Remove Exactly Two
Language: C++17 (GCC 7-32)


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

using namespace std;

#define ll long long
#define int long long
#define lld long double
#define endl "\n"
#define pb push_back
#define MOD 1000000007
#define inf 1e18
#define CHAR 256
#define all(x) x.begin(), x.end()
#define limits 100005
#define N 200005

/*---------------------------------------------------------------------------------------------------------------------------*/
ll gcd(ll a, ll b) {if (b > a) {return gcd(b, a);} if (b == 0) {return a;} return gcd(b, a % b);}
ll expo(ll a, ll b, ll mod) {ll res = 1; while (b > 0) {if (b & 1)res = (res * a) % mod; a = (a * a) % mod; b = b >> 1;} return res;}
void extendgcd(ll a, ll b, ll*v) {if (b == 0) {v[0] = 1; v[1] = 0; v[2] = a; return ;} extendgcd(b, a % b, v); ll x = v[1]; v[1] = v[0] - v[1] * (a / b); v[0] = x; return;} //pass an arry of size1 3
ll mminv(ll a, ll b) {ll arr[3]; extendgcd(a, b, arr); return arr[0];} //for non prime b
ll mminvprime(ll a, ll b) {return expo(a, b - 2, b);}
bool revsort(ll a, ll b) {return a > b;}
ll combination(ll n, ll r, ll m, ll *fact, ll *ifact) {ll val1 = fact[n]; ll val2 = ifact[n - r]; ll val3 = ifact[r]; return (((val1 * val2) % m) * val3) % m;}
vector<ll> sieve(int n) {int*arr = new int[n + 1](); vector<ll> vect; for (int i = 2; i <= n; i++)if (arr[i] == 0) {vect.push_back(i); for (int j = 2 * i; j <= n; j += i)arr[j] = 1;} return vect;}
ll mod_add(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a + b) % m) + m) % m;}
ll mod_mul(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a * b) % m) + m) % m;}
ll mod_sub(ll a, ll b, ll m) {a = a % m; b = b % m; return (((a - b) % m) + m) % m;}
ll mod_div(ll a, ll b, ll m) {a = a % m; b = b % m; return (mod_mul(a, mminvprime(b, m), m) + m) % m;}  //only for prime m
ll phin(ll n) {ll number = n; if (n % 2 == 0) {number /= 2; while (n % 2 == 0) n /= 2;} for (ll i = 3; i <= sqrt(n); i += 2) {if (n % i == 0) {while (n % i == 0)n /= i; number = (number / i * (i - 1));}} if (n > 1)number = (number / n * (n - 1)) ; return number;} //O(sqrt(N))
/*--------------------------------------------------------------------------------------------------------------------------*/


void solve(){
	int n, ans=1;
	cin >> n;
	vector<set<int>> adj(n+1);
	
	for(int i=0; i<n-1; i++){
	    int u, v;
	    cin >> u >> v;
	    adj[u].insert(v);
	    adj[v].insert(u);
	}
	
    for(int i=0; i<2; i++){
        int node=1;
        for(int i=1; i<=n; i++){
            if(adj[node].size()<adj[i].size())node=i;
        }
        
        ans+=adj[node].size()-1;
        for(auto it: adj[node])adj[it].erase(node);
        adj[node].clear();
    }
    
    cout << ans;
}
 

int32_t main(){
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	freopen("error.txt", "w", stderr);
#endif

    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr); std::cout.tie(nullptr);

    int t;
    cin >> t;


    while(t--){
        solve();
    	cout << "\n";
    }
    return 0;
}
Problem: 2050E - Three Strings
Language: C++20 (GCC 13-64)


Submission (verdict: Memory limit exceeded on test 14):
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<unordered_map>
#include<algorithm>
#include<set>
#include<iterator>
#include<sstream>
#include<fstream>
#include<queue>
#include<stack>
#include<unordered_set>
#include<numeric>
#include<utility>
#include<limits>
 
using namespace std;

int make_dp(vector< vector< vector<int> > >& dp, string a, string b, string c, int inda, int indb, int indc)
{
    if(dp[indc][indb][inda] != -1) return dp[indc][indb][inda];
    else if(inda >= a.length())
    {
        int temp = 0;
        int j = indb;
        int k = indc;
        while(j<b.length() && k<c.length())
        {
            if(b[j] != c[k]) temp++;

            j++;
            k++;
        }
        dp[indc][indb][inda] = temp;
        return dp[indc][indb][inda];
    }
    else if(indb >= b.length())
    {
        int temp = 0;
        int j = inda;
        int k = indc;
        while(j<a.length() && k<c.length())
        {
            if(a[j] != c[k]) temp++;

            j++;
            k++;
        }
        dp[indc][indb][inda] = temp;
        return dp[indc][indb][inda];
    }
    else
    {

        int temp1 = make_dp(dp, a, b, c, inda + 1, indb, indc + 1);
        int temp2 = make_dp(dp, a, b, c, inda, indb + 1, indc + 1);
        
        if(a[inda] != c[indc] && b[indb] != c[indc])
        {
            dp[indc][indb][inda] = min(1 + temp1, 1 + temp2);
        }
        else if(a[inda] == c[indc] && b[indb] != c[indc])
        {
            dp[indc][indb][inda] = min(temp1, 1 + temp2);
        }
        else if(a[inda] != c[indc] && b[indb] == c[indc])
        {
            dp[indc][indb][inda] = min(1 + temp1, temp2);
        }
        else 
        {
            dp[indc][indb][inda] = min(temp1, temp2);
        }

        return dp[indc][indb][inda];
    }
}


int main()
{
    int t;
    cin>>t;
    for(int i=0; i<t; i++)
    {
        string a, b, c;
        cin>>a>>b>>c;
        // question gives dynamic programming vibes
        int alen = a.length();
        int blen = b.length();
        int clen = c.length();

        vector< vector< vector<int> > > dp(clen + 1, vector<vector<int> >(blen + 1, vector<int>(alen + 1)));

        for(int j = 0; j <= clen; j++)
        {
            for(int k = 0; k <= blen; k++)
            {
                for(int l = 0; l <= alen; l++)
                {
                    dp[j][k][l] = -1;
                }
            }
        }

        cout<<make_dp(dp, a, b, c, 0, 0, 0)<<endl;
    }
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
using namespace std;
int mod=1e9+7;
long long power(long long x,int y)
{
    long long res=1;
    while(y>0)
    {
        int r=y%2;
        if(r==1)
        {
            res=res*x;
        }
        y=y/2;
        x=x*x;
    }
    return res;
}
int main() {
    int t;
    cin>>t;
    while(t--)
    {
       long long low,l,high,h;
       cin>>low>>high;
       l=low;
       h=high;
       vector<int>v1(35,0),v2(35,0);
       int j=32;
      // long long p=1;
       while(high>0)
       {
           int r1=high%2;
           int r2=low%2;
           v1[j]=r1;
           v2[j]=r2;
           j--;
          
           high=high/2;
           low=low/2;    
         
        }
       // cout<<j<<endl;
        long long z=0;
        int idx;
        for(int i=0;i<=32;i++)
        {
            if(v1[i]==v2[i])
            {
                continue;
            }
            idx=33-i;
           
           z=power(2,idx);
            z--;
            break;
        }
    //     cout<<z<<endl;
      //  cout<<z;
        long long num1=l^z;
        long long num2=h^z;
        if(num1<high&&num1>low)
        {
            cout<<l<<" "<<num1<<" "<<h<<endl;
        }
        else if(num2>low&&num2<high){
             cout<<l<<" "<<num2<<" "<<h<<endl;
        }
        else{
            cout<<l<<" "<<l+1<<" "<<h<<endl;
        }
    }
    
    return 0;
}

Submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
using namespace std;
int mod=1e9+7;
long long power(long long x,int y)
{
    long long res=1;
    while(y>0)
    {
        int r=y%2;
        if(r==1)
        {
            res=res*x;
        }
        y=y/2;
        x=x*x;
    }
    return res;
}
int main() {
    int t;
    cin>>t;
    while(t--)
    {
       long long low,l,high,h;
       cin>>low>>high;
       l=low;
       h=high;
       vector<int>v1(35,0),v2(35,0);
       int j=32;
      // long long p=1;
       while(high>0)
       {
           int r1=high%2;
           int r2=low%2;
           v1[j]=r1;
           v2[j]=r2;
           j--;
          
           high=high/2;
           low=low/2;    
         
        }
       // cout<<j<<endl;
        long long z=0;
        int idx;
        for(int i=0;i<=32;i++)
        {
            if(v1[i]==v2[i])
            {
                continue;
            }
            idx=33-i;
           
           z=power(2,idx);
            z--;
            break;
        }
        cout<<z<<endl;
      //  cout<<z;
        long long num1=l^z;
        long long num2=h^z;
        if(num1<h&&num1>l)
        {
            cout<<l<<" "<<num1<<" "<<h<<endl;
        }
        else if(num2>l&&num2<h){
             cout<<l<<" "<<num2<<" "<<h<<endl;
        }
        else{
            cout<<l<<" "<<l+1<<" "<<h<<endl;
        }
    }
    
    return 0;
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
using namespace std;
long long power(int x,int y)
{
    long long res=1;
    while(y>0)
    {
        int r=y%2;
        if(r==1)
        {
            res=res*x;
        }
        y=y/2;
        x=x*x;
    }
    return res;
}
int main() {
    int t;
    cin>>t;
    while(t--)
    {
       long long low,l,high,h;
       cin>>low>>high;
       l=low;
       h=high;
       vector<int>v1(35,0),v2(35,0);
       int j=32;
      // long long p=1;
       while(high>0)
       {
           int r1=high%2;
           int r2=low%2;
           v1[j]=r1;
           v2[j]=r2;
           j--;
          
           high=high/2;
           low=low/2;    
         
        }
       // cout<<j<<endl;
        long long z=0;
        int idx;
        for(int i=0;i<=32;i++)
        {
            if(v1[i]==v2[i])
            {
                continue;
            }
            idx=33-i;
           
           z=power(2,idx);
            z--;
            break;
        }
    //     cout<<z<<endl;
      //  cout<<z;
        long long num1=l^z;
        long long num2=h^z;
        if(num1<high&&num1>low)
        {
            cout<<l<<" "<<num1<<" "<<h<<endl;
        }
        else if(num2>low&&num2<high){
             cout<<l<<" "<<num2<<" "<<h<<endl;
        }
        else{
            cout<<l<<" "<<l+1<<" "<<h<<endl;
        }
    }
    
    return 0;
}

Submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
using namespace std;
int mod=1e9+7;
long long power(long long x,int y)
{
    long long res=1;
    while(y>0)
    {
        int r=y%2;
        if(r==1)
        {
            res=res*x;
        }
        y=y/2;
        x=x*x;
    }
    return res;
}
int main() {
    int t;
    cin>>t;
    while(t--)
    {
       long long low,l,high,h;
       cin>>low>>high;
       l=low;
       h=high;
       vector<int>v1(35,0),v2(35,0);
       int j=32;
      // long long p=1;
       while(high>0)
       {
           int r1=high%2;
           int r2=low%2;
           v1[j]=r1;
           v2[j]=r2;
           j--;
          
           high=high/2;
           low=low/2;    
         
        }
       // cout<<j<<endl;
        long long z=0;
        int idx;
        for(int i=0;i<=32;i++)
        {
            if(v1[i]==v2[i])
            {
                continue;
            }
            idx=33-i;
           
           z=power(2,idx);
            z--;
            break;
        }
    //     cout<<z<<endl;
      //  cout<<z;
        long long num1=l^z;
        long long num2=h^z;
        if(num1<high&&num1>low)
        {
            cout<<l<<" "<<num1<<" "<<h<<endl;
        }
        else if(num2>low&&num2<high){
             cout<<l<<" "<<num2<<" "<<h<<endl;
        }
        else{
            cout<<l<<" "<<l+1<<" "<<h<<endl;
        }
    }
    
    return 0;
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)


Submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
using namespace std;
long long power(int x,int y)
{
    long long res=1;
    while(y>0)
    {
        int r=y%2;
        if(r==1)
        {
            res=res*x;
        }
        y=y/2;
        x=x*x;
    }
    return res;
}
int main() {
    int t;
    cin>>t;
    while(t--)
    {
       long long low,l,high,h;
       cin>>low>>high;
       l=low;
       h=high;
       vector<int>v1(35,0),v2(35,0);
       int j=32;
      // long long p=1;
       while(high>0)
       {
           int r1=high%2;
           int r2=low%2;
           v1[j]=r1;
           v2[j]=r2;
           j--;
          
           high=high/2;
           low=low/2;    
         
        }
       // cout<<j<<endl;
        long long z=0;
        int idx;
        for(int i=0;i<=32;i++)
        {
            if(v1[i]==v2[i])
            {
                continue;
            }
            idx=33-i;
           
           z=power(2,idx);
            z--;
            break;
        }
    //     cout<<z<<endl;
      //  cout<<z;
        long long num1=l^z;
        long long num2=h^z;
        if(num1<high&&num1>low)
        {
            cout<<l<<" "<<num1<<" "<<h<<endl;
        }
        else if(num2>low&&num2<high){
             cout<<l<<" "<<num2<<" "<<h<<endl;
        }
        else{
            cout<<l<<" "<<l+1<<" "<<h<<endl;
        }
    }
    
    return 0;
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
using namespace std;
int mod=1e9+7;
long long power(long long x,int y)
{
    long long res=1;
    while(y>0)
    {
        int r=y%2;
        if(r==1)
        {
            res=res*x;
        }
        y=y/2;
        x=x*x;
    }
    return res;
}
int main() {
    int t;
    cin>>t;
    while(t--)
    {
       long long low,l,high,h;
       cin>>low>>high;
       l=low;
       h=high;
       vector<int>v1(35,0),v2(35,0);
       int j=32;
      // long long p=1;
       while(high>0)
       {
           int r1=high%2;
           int r2=low%2;
           v1[j]=r1;
           v2[j]=r2;
           j--;
          
           high=high/2;
           low=low/2;    
         
        }
       // cout<<j<<endl;
        long long z=0;
        int idx;
        for(int i=0;i<=32;i++)
        {
            if(v1[i]==v2[i])
            {
                continue;
            }
            idx=33-i;
           
           z=power(2,idx);
            z--;
            break;
        }
        cout<<z<<endl;
      //  cout<<z;
        long long num1=l^z;
        long long num2=h^z;
        if(num1<h&&num1>l)
        {
            cout<<l<<" "<<num1<<" "<<h<<endl;
        }
        else if(num2>l&&num2<h){
             cout<<l<<" "<<num2<<" "<<h<<endl;
        }
        else{
            cout<<l<<" "<<l+1<<" "<<h<<endl;
        }
    }
    
    return 0;
}

Submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
using namespace std;
int mod=1e9+7;
long long power(long long x,int y)
{
    long long res=1;
    while(y>0)
    {
        int r=y%2;
        if(r==1)
        {
            res=res*x;
        }
        y=y/2;
        x=x*x;
    }
    return res;
}
int main() {
    int t;
    cin>>t;
    while(t--)
    {
       long long low,l,high,h;
       cin>>low>>high;
       l=low;
       h=high;
       vector<int>v1(35,0),v2(35,0);
       int j=32;
      // long long p=1;
       while(high>0)
       {
           int r1=high%2;
           int r2=low%2;
           v1[j]=r1;
           v2[j]=r2;
           j--;
          
           high=high/2;
           low=low/2;    
         
        }
       // cout<<j<<endl;
        long long z=0;
        int idx;
        for(int i=0;i<=32;i++)
        {
            if(v1[i]==v2[i])
            {
                continue;
            }
            idx=33-i;
           
           z=power(2,idx);
            z--;
            break;
        }
       // cout<<z<<endl;
      //  cout<<z;
        long long num1=l^z;
        long long num2=h^z;
        if(num1<h&&num1>l)
        {
            cout<<l<<" "<<num1<<" "<<h<<endl;
        }
        else if(num2>l&&num2<h){
             cout<<l<<" "<<num2<<" "<<h<<endl;
        }
        else{
            cout<<l<<" "<<l+1<<" "<<h<<endl;
        }
    }
    
    return 0;
}