Problem: 2057C - Trip to the Olympiad
Language: C++20 (GCC 13-64)

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

using ui = unsigned int;
using ll = long long;
using db = double;
using vll = vector<long long>;
using vpll = vector<pair<long long, long long>>;
using vvll = vector<vector<long long>>;
using gll = greater<long long>;
using pll = pair<ll, ll>;
using pss = pair<string, string>;
using vui = vector<unsigned int>;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define pb push_back
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound

#define fast                     \
    ios::sync_with_stdio(false); \
    cin.tie(0);

ll gcd(ll a, ll b) {
    while (b != 0) {
        ll tmp = a % b;
        a = b;
        b = tmp;
    }
    return a;
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }

void print(ll* a, int n) {
    for (int i = 0; i < n; i++) {
        cout << a[i] << " ";
    }
    cout << endl;
}

void print(vll& a) {
    for (int i = 0; i < a.size(); i++) {
        cout << a[i] << " ";
    }
    cout << endl;
}

ll ind(ll a, ll b, ll c) { return (a ^ b) + (b ^ c) + (c ^ a); }

void solve(int sura) {
    ll l, r;
    cin >> l >> r;
    int i = 32;
    while (((l >> i) & 1) == ((r >> i) & 1)) {
        i--;
    }
    ll a = 1;
    while (i--) a *= 2;
    if (a - 1 != l) {
        cout << a << " " << a - 1 << " " << l << endl;
    } else {
        cout << a << " " << a - 1 << " " << a + 1 << endl;
    }
}

int main() {
    // //{-_-}//
    int sura = 1;
    cin >> sura;
    for (int i = 1; i <= sura; i++) {
        solve(i);
    }
}

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

using ui = unsigned int;
using ll = long long;
using db = double;
using vll = vector<long long>;
using vpll = vector<pair<long long, long long>>;
using vvll = vector<vector<long long>>;
using gll = greater<long long>;
using pll = pair<ll, ll>;
using pss = pair<string, string>;
using vui = vector<unsigned int>;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define pb push_back
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound

#define fast                     \
    ios::sync_with_stdio(false); \
    cin.tie(0);

ll gcd(ll a, ll b) {
    while (b != 0) {
        ll tmp = a % b;
        a = b;
        b = tmp;
    }
    return a;
}
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }

void print(ll* a, int n) {
    for (int i = 0; i < n; i++) {
        cout << a[i] << " ";
    }
    cout << endl;
}

void print(vll& a) {
    for (int i = 0; i < a.size(); i++) {
        cout << a[i] << " ";
    }
    cout << endl;
}

ll ind(ll a, ll b, ll c) { return (a ^ b) + (b ^ c) + (c ^ a); }

void solve(int sura) {
    ll l, r;
    cin >> l >> r;
    int i = 32;
    while (((l >> i) & 1) == ((r >> i) & 1)) {
        i--;
    }
    ll offset = ((l >> i) << i);
    ll a = 1;
    while (i--) a *= 2;
    a += offset;
    if (a - 1 != l) {
        cout << a << " " << a - 1 << " " << l << endl;
    } else {
        cout << a << " " << a - 1 << " " << a + 1 << endl;
    }
}

int main() {
    //{-_-}//
    int sura = 1;
    cin >> sura;
    for (int i = 1; i <= sura; i++) {
        solve(i);
    }
}