Problem: 2057C - Trip to the Olympiad
Language: C++23 (GCC 14-64, msys2)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h> 
#define ll long long
#define newl <<'\n'
#define newt <<'\t'
#define news <<' '
#define forn(n,i) for(ll i = 0;i<n;i++)
#define forr(n,k,i) for(ll i = k;i<n;i++)
#define for2(n,k) for(int j = k;j<n;j++)
#define for3(n,k) for(int j = n;j>=k;j--)
#define modd 1000000007
#define mo 998244353
#define llp unsigned long long
#define pb push_back
#define get(a) ll a;cin>>a;
#define all(a) a.begin(),a.end()
using namespace std;
typedef vector < ll > vi;
typedef vector < bool > vb;
typedef vector < vi > vvi;
typedef pair < ll, ll > ii; 
typedef vector < ii > vii;
typedef set <ll> sat;
typedef multiset <ll> msat;
llp power(llp a,llp b)
{
    a%=modd;
    llp res = 1;
    while(b>0)
    { 
        if(b&1)res=(res*a + modd)%modd;
        a=(a*a + modd)%modd;b>>=1;
    }
    return res;
}

void solve()
{
    ll l,r;
    cin >> l >> r;
    ll t = 1,ct = 0;
    ll a = 0,b = 0;
    while(2*t<=r)t<<=1,++ct;
    while(ct)
    {
        if(t&(r&l)){
            a+=t,b+=t;
        }
        else{
            a+=t;
            b+=t-1;
            break;
        }
        --ct;t>>=1;
    }
    for(int i = l;i<=r;++i)
    {
        if(i!=a&&i!=b)
        {
            cout << a news << i news << b newl;
            break;
        }
    }
}

int main(void)
{   
//    freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    ll tc = 1;
    cin>>tc;
    while(tc--)
    {
        solve();    
    }
    
    

}

Submission (verdict: Accepted):
#include <bits/stdc++.h> 
#define ll long long
#define newl <<'\n'
#define newt <<'\t'
#define news <<' '
#define forn(n,i) for(ll i = 0;i<n;i++)
#define forr(n,k,i) for(ll i = k;i<n;i++)
#define for2(n,k) for(int j = k;j<n;j++)
#define for3(n,k) for(int j = n;j>=k;j--)
#define modd 1000000007
#define mo 998244353
#define llp unsigned long long
#define pb push_back
#define get(a) ll a;cin>>a;
#define all(a) a.begin(),a.end()
using namespace std;
typedef vector < ll > vi;
typedef vector < bool > vb;
typedef vector < vi > vvi;
typedef pair < ll, ll > ii; 
typedef vector < ii > vii;
typedef set <ll> sat;
typedef multiset <ll> msat;
llp power(llp a,llp b)
{
    a%=modd;
    llp res = 1;
    while(b>0)
    { 
        if(b&1)res=(res*a + modd)%modd;
        a=(a*a + modd)%modd;b>>=1;
    }
    return res;
}

void solve()
{
    ll l,r;
    cin >> l >> r;
    ll t = 1,ct = 0;
    ll a = 0,b = 0;
    while(2*t<=r)t<<=1,++ct;
    // cout<<t news;
    while(ct)
    {
        if(t&(r&l)){
            a+=t,b+=t;
        }
        else if(r&t){
            a+=t;
            b+=t-1;
            break;
        }
        --ct;t>>=1;
    }
    for(int i = l;i<=r;++i)
    {
        if(i!=a&&i!=b)
        {
            cout << a news << i news << b newl;
            break;
        }
    }
}

int main(void)
{   
//    freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    ll tc = 1;
    cin>>tc;
    while(tc--)
    {
        solve();    
    }
    
    

}