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

Previous submission (verdict: Wrong answer on test 1):
/* -------------------------------------- HEADER FILES ---------------------------------------- */

/**
 *    username:  aditya_0670
 *    created: 2025-01-04 01:53:22
 **/

  #include <bits/stdc++.h>
  using namespace std;

/* ------------------------------------ MACROS & CONSTANTS ------------------------------------ */

  #ifndef ONLINE_JUDGE
      #include "debug.h"
  #else
      #define debug(...) ;
  #endif

  #define int             long long
  #define all(v)          (v).begin(), (v).end()
  #define rall(v)         (v).rbegin(), (v).rend()
  #define fastio          ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr)

  constexpr int MOD = 1E9 + 7;
  constexpr int INF = 1E18;


/* ------------------------------------ OTHER FUNCTIONS ------------------------------------ */


/* ------------------------------------ LAMBDA TEMPLATE ------------------------------------- */

  auto solve = [] -> void
  {
      int l, r; cin >> l >> r;

      int a = 0, b = 0, c = 0;
      for (int i = 29; i >= 0; i--)
      {
          if (((l >> i) & 1) == ((r >> i) & 1)) 
          {
              a |= (l & (1 << i));
              b |= (l & (1 << i));
          }
          else 
          {
             a |= (1 << i);
             b |= ((1 << i) - 1);
             break;
          }
      }

      cout << l << ' ' << b << ' ' << a << '\n';
  };

/* ------------------------------------ MAIN FUNCTION --------------------------------------- */

  signed main() 
  {
      fastio;

      int t = 1;
      cin >> t;
      while (t--) solve();

      return 0;
  }


Submission (verdict: Accepted):
/* -------------------------------------- HEADER FILES ---------------------------------------- */

/**
 *    username:  aditya_0670
 *    created: 2025-01-04 01:53:22
 **/

  #include <bits/stdc++.h>
  using namespace std;

/* ------------------------------------ MACROS & CONSTANTS ------------------------------------ */

  #ifndef ONLINE_JUDGE
      #include "debug.h"
  #else
      #define debug(...) ;
  #endif

  #define int             long long
  #define all(v)          (v).begin(), (v).end()
  #define rall(v)         (v).rbegin(), (v).rend()
  #define fastio          ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr)

  constexpr int MOD = 1E9 + 7;
  constexpr int INF = 1E18;


/* ------------------------------------ OTHER FUNCTIONS ------------------------------------ */


/* ------------------------------------ LAMBDA TEMPLATE ------------------------------------- */

  auto solve = [] -> void
  {
      int l, r; cin >> l >> r;

      int a = 0, b = 0, c = 0;
      for (int i = 29; i >= 0; i--)
      {
          if (((l >> i) & 1) == ((r >> i) & 1)) 
          {
              a |= (l & (1 << i));
              b |= (l & (1 << i));
          }
          else 
          {
             a |= (1 << i);
             b |= ((1 << i) - 1);
             break;
          }
      }

      if (l == b) l++;
      if (l == a) l++;

      cout << l << ' ' << b << ' ' << a << '\n';
  };

/* ------------------------------------ MAIN FUNCTION --------------------------------------- */

  signed main() 
  {
      fastio;

      int t = 1;
      cin >> t;
      while (t--) solve();

      return 0;
  }