Problem: 2057C - Trip to the Olympiad
Language: c++23 

Code 1:
/*                                                     ॐ हं हनुमते नमः                                                                                              */

#include <bits/stdc++.h>
//#include "debugging.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define ll long long
const int mod = 1000000007;
#define pb push_back
#define s second
#define f first
#define mp make_pair
#define rep(i,a,b) for(int i = a ; i<=b ; i++)
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define vvll vector<vector<long long>>
#define vpi vector<pair<int , int>>
#define Sort(a) sort(a.begin() , a.end())
#define Max(a) *max_element(a.begin() , a.end())
#define Min(a) *min_element(a.begin() , a.end())
/***************************************************************************************************************************************************************/

int binexpo(ll a, ll b, ll m = mod){ ll res = 1; a%=m; while(b>0){ if(b&1){ res= (res*a)%m; } a = (a*a)%m; b>>=1; } return res; }
int gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b);}
int lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
int modInverse(ll a, ll m) { return binexpo(a, m - 2, m); }
int modAdd(ll a, ll b, int m) { return ((a % m) + (b % m)) % m; }
int modMul(ll a, ll b, int m) { return ((a % m) * (b % m)) % m; }
int modSub(ll a, ll b, int m) { return ((a % m) - (b % m) + m) % m; }
int modDiv(ll a, ll b, int m) { return (modMul(a, modInverse(b, m), m) + m) % m; }
bool isPrime(int n) { if (n <= 1) return false; if (n <= 3) return true; if (n % 2 == 0 || n % 3 == 0) return false; for (int i = 5; i * i <= n; i = i + 6) if (n % i == 0 || n % (i + 2) == 0) return false; return true; }
int nCr(int n, int r) { if (r > n - r) r = n - r; int ans = 1; for (int i = 0; i < r; i++) { ans *= (n - i); ans /= (i + 1); } return ans; }
int nCrModP(int n, int r, int p = mod) { if (r > n - r) r = n - r; int C[r + 1]; memset(C, 0, sizeof(C)); C[0] = 1; for (int i = 1; i <= n; i++) { for (int j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j - 1]) % p; } return C[r]; }
int nPr(int n, int r) { int ans = 1; for (int i = 0; i < r; i++) ans *= (n - i); return ans; }
int nPrModP(int n, int r, int p = mod) { int ans = 1; for (int i = 0; i < r; i++) ans = (ans * (n - i)) % p; return ans; }
int log(int num , int base){int ans = 0; while(num){num /= base;ans++;} return ans;}
int countSetBits(int x){int ans = 0;while(x){ans += (x&1);x >>= 1;}return ans;}
/***************************************************************************************************************************************************************/
/*Always High on CP*/

void legend(){
    int l , r;cin>>l>>r;
    int a = 0;
    int b = 0;
    for(int i = 30 ; i>=0 ; i--){
        int bit1 = (l&(1<<i));
        int bit2 = (r&(1<<i));
        if(bit1 == bit2){
            if(bit1 != 0) a |= (1<<i);
        }
        else{
            a += (1<<i);
            b = a - 1;
            break;
        }
    }
    int c = 0;
    for(int i = l ; i<=r ; i++){
        if(i != a && i != b){
            c = i;
            break;
        }
    }
    cout<<a<<" "<<b<<" "<<c<<endl;
}

/*Now setting the heart on fire*/

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t;cin>>t;
    while(t--){
      legend();
    }
    return 0;
}

Code 2:
/*                                                     ॐ हं हनुमते नमः                                                                                              */

#include <bits/stdc++.h>
//#include "debugging.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define ll long long
const int mod = 1000000007;
#define pb push_back
#define s second
#define f first
#define mp make_pair
#define rep(i,a,b) for(int i = a ; i<=b ; i++)
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define vvll vector<vector<long long>>
#define vpi vector<pair<int , int>>
#define Sort(a) sort(a.begin() , a.end())
#define Max(a) *max_element(a.begin() , a.end())
#define Min(a) *min_element(a.begin() , a.end())
/***************************************************************************************************************************************************************/

int binexpo(ll a, ll b, ll m = mod){ ll res = 1; a%=m; while(b>0){ if(b&1){ res= (res*a)%m; } a = (a*a)%m; b>>=1; } return res; }
int gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b);}
int lcm(ll a, ll b) { return (a * b) / gcd(a, b); }
int modInverse(ll a, ll m) { return binexpo(a, m - 2, m); }
int modAdd(ll a, ll b, int m) { return ((a % m) + (b % m)) % m; }
int modMul(ll a, ll b, int m) { return ((a % m) * (b % m)) % m; }
int modSub(ll a, ll b, int m) { return ((a % m) - (b % m) + m) % m; }
int modDiv(ll a, ll b, int m) { return (modMul(a, modInverse(b, m), m) + m) % m; }
bool isPrime(int n) { if (n <= 1) return false; if (n <= 3) return true; if (n % 2 == 0 || n % 3 == 0) return false; for (int i = 5; i * i <= n; i = i + 6) if (n % i == 0 || n % (i + 2) == 0) return false; return true; }
int nCr(int n, int r) { if (r > n - r) r = n - r; int ans = 1; for (int i = 0; i < r; i++) { ans *= (n - i); ans /= (i + 1); } return ans; }
int nCrModP(int n, int r, int p = mod) { if (r > n - r) r = n - r; int C[r + 1]; memset(C, 0, sizeof(C)); C[0] = 1; for (int i = 1; i <= n; i++) { for (int j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j - 1]) % p; } return C[r]; }
int nPr(int n, int r) { int ans = 1; for (int i = 0; i < r; i++) ans *= (n - i); return ans; }
int nPrModP(int n, int r, int p = mod) { int ans = 1; for (int i = 0; i < r; i++) ans = (ans * (n - i)) % p; return ans; }
int log(int num , int base){int ans = 0; while(num){num /= base;ans++;} return ans;}
int countSetBits(int x){int ans = 0;while(x){ans += (x&1);x >>= 1;}return ans;}
/***************************************************************************************************************************************************************/
/*Always High on CP*/

void legend(){
    int l , r;cin>>l>>r;
    int a = 0;
    int b = 0;
    for(int i = 30 ; i>=0 ; i--){
        int bit1 = (l&(1<<i));
        int bit2 = (r&(1<<i));
        if(bit1 == bit2){
            if(bit1 != 0) a |= (1<<i);
        }
        else{
            a |= (1<<i);
            b = a - 1;
        }
    }
    int c = 0;
    for(int i = l ; i<=r ; i++){
        if(i != a && i != b){
            c = i;
            break;
        }
    }
    cout<<a<<" "<<b<<" "<<c<<endl;
}

/*Now setting the heart on fire*/

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int t;cin>>t;
    while(t--){
      legend();
    }
    return 0;
}

Answer: 1