ShaysXIA/CodeInsightBench huggingface dataset:
Problem: 2062C - Cirno and Operations
Language: C++20 (GCC 13-64)

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

#define ll long long
#define vi vector<int>
#define vil vector<long long>
#define all(v) v.begin(), v.end()
#define MOD 1000000007
#define MXL 1000000000000000000
#define PI (long double)2 * acos(0.0)
#define NO cout << "NO" << endl
#define YES cout << "YES" << endl

void input(int i, int n, vector<int> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

void inputl(int i, int n, vector<long long> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

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

void solve() {
    int n;
    cin>>n;
    vi a(n);
    input(0,n,a);
    if(n==1){
        cout<<a[0]<<endl;
        return;
    }
    ll ans = MXL;
    ll sum = accumulate(all(a), 0LL);
    ans = max(ans, sum);
    for (int j = 0; j < n;j++){
        for (int i = 1; i < a.size(); i++)
        {
            a[i-1] = a[i] - a[i - 1];
        }
        a.pop_back();
        ans = max(abs(accumulate(all(a), 0LL)), ans);
    }
    cout << ans << endl;
}

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

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

#define ll long long
#define vi vector<int>
#define vil vector<long long>
#define all(v) v.begin(), v.end()
#define MOD 1000000007
#define MXL 1000000000000000000
#define PI (long double)2 * acos(0.0)
#define NO cout << "NO" << endl
#define YES cout << "YES" << endl

void input(int i, int n, vector<int> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

void inputl(int i, int n, vector<long long> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

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

void solve() {
    int n;
    cin>>n;
    vi a(n);
    input(0,n,a);
    if(n==1){
        cout<<a[0]<<endl;
        return;
    }
    ll ans = LLONG_MIN;
    ll sum = accumulate(all(a), 0LL);
    ans = max(ans, sum);
    for (int j = 0; j < n;j++){
        for (int i = 1; i < a.size(); i++)
        {
            a[i-1] = a[i] - a[i - 1];
        }
        a.pop_back();
        ans = max(abs(accumulate(all(a), 0LL)), ans);
    }
    cout << ans << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}
Problem: 2062C - Cirno and Operations
Language: C++20 (GCC 13-64)

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

#define ll long long
#define vi vector<int>
#define vil vector<long long>
#define all(v) v.begin(), v.end()
#define MOD 1000000007
#define MXL 1000000000000000000
#define PI (long double)2 * acos(0.0)
#define NO cout << "NO" << endl
#define YES cout << "YES" << endl

void input(int i, int n, vector<int> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

void inputl(int i, int n, vector<long long> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

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

void solve() {
    int n;
    cin>>n;
    vi a(n);
    input(0,n,a);
    if(n==1){
        cout<<a[0]<<endl;
        return;
    }
    ll ans = LLONG_MIN;
    ll sum = accumulate(all(a), 0LL);
    ans = max(ans, sum);
    for (int j = 0; j < n;j++){
        for (int i = 1; i < a.size(); i++)
        {
            a[i-1] = a[i] - a[i - 1];
        }
        a.pop_back();
        ans = max(abs(accumulate(all(a), 0LL)), ans);
    }
    cout << ans << endl;
}

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

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

#define ll long long
#define vi vector<int>
#define vil vector<long long>
#define all(v) v.begin(), v.end()
#define MOD 1000000007
#define MXL 1000000000000000000
#define PI (long double)2 * acos(0.0)
#define NO cout << "NO" << endl
#define YES cout << "YES" << endl

void input(int i, int n, vector<int> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

void inputl(int i, int n, vector<long long> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

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

void solve() {
    int n;
    cin>>n;
    vil a(n);
    inputl(0,n,a);
    if(n==1){
        cout<<a[0]<<endl;
        return;
    }
    ll ans = LLONG_MIN;
    ll sum = accumulate(all(a), 0LL);
    ans = max(ans, sum);
    for (int j = 0; j < n;j++){
        for (int i = 1; i < a.size(); i++)
        {
            a[i-1] = a[i] - a[i - 1];
        }
        a.pop_back();
        ans = max((ll)abs(accumulate(all(a), 0LL)), ans);
    }
    cout << ans << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}
Problem: 2062C - Cirno and Operations
Language: C++20 (GCC 13-64)


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

#define ll long long
#define vi vector<int>
#define vil vector<long long>
#define all(v) v.begin(), v.end()
#define MOD 1000000007
#define MXL 1000000000000000000
#define PI (long double)2 * acos(0.0)
#define NO cout << "NO" << endl
#define YES cout << "YES" << endl

void input(int i, int n, vector<int> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

void inputl(int i, int n, vector<long long> &a) {
    for (int k = i; k < n; k++) cin >> a[k];
}

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

void solve() {
    int n;
    cin>>n;
    vi a(n);
    input(0,n,a);
    if(n==1){
        cout<<a[0]<<endl;
        return;
    }
    ll ans = INT_MIN;
    ll sum = accumulate(all(a), 0LL);
    ans = max(ans, sum);
    for (int j = 0; j < n;j++){
        for (int i = 1; i < a.size(); i++)
        {
            a[i-1] = a[i] - a[i - 1];
        }
        a.pop_back();
        ans = max(abs(accumulate(all(a), 0LL)), ans);
    }
    cout << ans << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}
Problem: 2050E - Three Strings
Language: C++17 (GCC 7-32)


Submission (verdict: Time limit exceeded on test 16):
#include <iostream>

#include <vector>

#include <algorithm>



int res = 1e9;





/*

    egg

    annie

    egaegaeg

*/ 

void solve(std::string& a,std::string& b, const std::string& c, std::string cur, int i, int j, int k) {

    if (i == c.size()) {

        int temp = 0;

        for (int i = 0; i < c.size(); i++) {

                if (cur[i] != c[i])            

                    temp++;

            }

            

        res = std::min(res, temp);

        return;

    }

    

    if (j < a.size())

        solve(a, b, c, cur + a[j], i, j + 1, k);



    if (k < b.size())

        solve(a, b, c, cur + b[k], i, j, k + 1);

}



int main() {

    int t;

    std::cin >> t;

    while (t--) {

        std::string a;

        std::string b;

        std::string c;

        std::cin >> a >> b >> c; 

        solve(a, b, c, "", 0, 0, 0);

        std::cout << res << '\n';

    }

}
Problem: 2050E - Three Strings
Language: C++17 (GCC 7-32)

Previous submission (verdict: Time limit exceeded on test 16):
#include <iostream>

#include <vector>

#include <algorithm>



int res = 1e9;



/*

    egg

    annie

    egaegaeg

*/ 

void solve(std::string& a,std::string& b, const std::string& c, std::string cur, int i, int j, int k) {

    if (i == c.size()) {

        int temp = 0;

        for (int i = 0; i < c.size(); i++) {

                if (cur[i] != c[i])            

                    temp++;

            }

            

        res = std::min(res, temp);

        return;

    }

    

    if (j < a.size())

        solve(a, b, c, cur + a[j], i++, j + 1, k);



    if (k < b.size())

        solve(a, b, c, cur + b[k], i++, j, k + 1);

}



int main() {

    int t;

    std::cin >> t;

    while (t--) {

        std::string a;

        std::string b;

        std::string c;

        std::cin >> a >> b >> c; 

        solve(a, b, c, "", 0, 0, 0);

        std::cout << res << '\n';

    }

}



Submission (verdict: Accepted):
#include <iostream>

#include <vector>

#include <algorithm>



int res = 1e9;



/*

    egg

    annie

    egaegaeg

*/ 

void solve(std::string& a,std::string& b, const std::string& c, std::string cur, int i, int j, int k) {

    if (i == c.size()) {

        int temp = 0;

        for (int i = 0; i < c.size(); i++) {

                if (cur[i] != c[i])            

                    temp++;

            }

            

        res = std::min(res, temp);

        return;

    }

    

    if (j < a.size())

        solve(a, b, c, cur + a[j], i + 1, j + 1, k);



    if (k < b.size())

        solve(a, b, c, cur + b[k], i + 1, j, k + 1);

}



int main() {

    int t;

    std::cin >> t;

    while (t--) {

        std::string a;

        std::string b;

        std::string c;

        std::cin >> a >> b >> c; 

        solve(a, b, c, "", 0, 0, 0);

        std::cout << res << '\n';

    }

}
Problem: 2050E - Three Strings
Language: C++17 (GCC 7-32)

Previous submission (verdict: Time limit exceeded on test 16):
#include <iostream>

#include <vector>

#include <algorithm>



int res = 1e9;





/*

    egg

    annie

    egaegaeg

*/ 

void solve(std::string& a,std::string& b, const std::string& c, std::string cur, int i, int j, int k) {

    if (i == c.size()) {

        int temp = 0;

        for (int i = 0; i < c.size(); i++) {

                if (cur[i] != c[i])            

                    temp++;

            }

            

        res = std::min(res, temp);

        return;

    }

    

    if (j < a.size())

        solve(a, b, c, cur + a[j], i, j + 1, k);



    if (k < b.size())

        solve(a, b, c, cur + b[k], i, j, k + 1);

}



int main() {

    int t;

    std::cin >> t;

    while (t--) {

        std::string a;

        std::string b;

        std::string c;

        std::cin >> a >> b >> c; 

        solve(a, b, c, "", 0, 0, 0);

        std::cout << res << '\n';

    }

}



Submission (verdict: Time limit exceeded on test 16):
#include <iostream>

#include <vector>

#include <algorithm>



int res = 1e9;



/*

    egg

    annie

    egaegaeg

*/ 

void solve(std::string& a,std::string& b, const std::string& c, std::string cur, int i, int j, int k) {

    if (i == c.size()) {

        int temp = 0;

        for (int i = 0; i < c.size(); i++) {

                if (cur[i] != c[i])            

                    temp++;

            }

            

        res = std::min(res, temp);

        return;

    }

    

    if (j < a.size())

        solve(a, b, c, cur + a[j], i++, j + 1, k);



    if (k < b.size())

        solve(a, b, c, cur + b[k], i++, j, k + 1);

}



int main() {

    int t;

    std::cin >> t;

    while (t--) {

        std::string a;

        std::string b;

        std::string c;

        std::cin >> a >> b >> c; 

        solve(a, b, c, "", 0, 0, 0);

        std::cout << res << '\n';

    }

}
Problem: 2049C - MEX Cycle
Language: C++23 (GCC 14-64, msys2)

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



#define int long long

#define endl '\n'



using namespace std;



void sorter(vector<int> &x){

    sort(x.begin(), x.end());

}



void rsorter(vector<int> &x){

    sort(x.rbegin(), x.rend());

}



struct custom_hash {

    static uint64_t splitmix64(uint64_t x) {

        // http://xorshift.di.unimi.it/splitmix64.c

        x += 0x9e3779b97f4a7c15;

        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;

        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;

        return x ^ (x >> 31);

    }



    size_t operator()(uint64_t x) const {

        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();

        return splitmix64(x + FIXED_RANDOM);

    }

};







void solve(){

    int n,x,y;

    cin>>n>>x>>y;

    if(n%2){

        for(int i=1;i<=n;i++){

            if(i==x) cout<<2<<" ";

            else{

                cout<<i%2<<" ";

            }

        }

    }

    else{

        if((y-x)%2){

            for(int i=1;i<=n;i++){

                if(i==x) cout<<2<<" ";

                else{

                    cout<<i%2<<" ";

                }

            }

        }

        else{

            for(int i=1;i<=n;i++) cout<<i%2<<" ";

        }

    }

    cout<<endl;

}



int32_t main() {    

    // fast io

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    int t=1;

    cin>>t;

    while(t--){

        solve();

    }

}

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



#define int long long

#define endl '\n'



using namespace std;



void sorter(vector<int> &x){

    sort(x.begin(), x.end());

}



void rsorter(vector<int> &x){

    sort(x.rbegin(), x.rend());

}



struct custom_hash {

    static uint64_t splitmix64(uint64_t x) {

        // http://xorshift.di.unimi.it/splitmix64.c

        x += 0x9e3779b97f4a7c15;

        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;

        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;

        return x ^ (x >> 31);

    }



    size_t operator()(uint64_t x) const {

        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();

        return splitmix64(x + FIXED_RANDOM);

    }

};







void solve(){

    int n,x,y;

    cin>>n>>x>>y;

    if(n%2){

        for(int i=1;i<=n;i++){

            if(i==x) cout<<2<<" ";

            else{

                cout<<i%2<<" ";

            }

        }

    }

    else{

        if((y-x)%2==0){

            for(int i=1;i<=n;i++){

                if(i==x) cout<<2<<" ";

                else{

                    cout<<i%2<<" ";

                }

            }

        }

        else{

            for(int i=1;i<=n;i++) cout<<i%2<<" ";

        }

    }

    cout<<endl;

}



int32_t main() {    

    // fast io

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    int t=1;

    cin>>t;

    while(t--){

        solve();

    }

}
Problem: 2049C - MEX Cycle
Language: C++23 (GCC 14-64, msys2)


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



#define int long long

#define endl '\n'



using namespace std;



void sorter(vector<int> &x){

    sort(x.begin(), x.end());

}



void rsorter(vector<int> &x){

    sort(x.rbegin(), x.rend());

}



struct custom_hash {

    static uint64_t splitmix64(uint64_t x) {

        // http://xorshift.di.unimi.it/splitmix64.c

        x += 0x9e3779b97f4a7c15;

        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;

        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;

        return x ^ (x >> 31);

    }



    size_t operator()(uint64_t x) const {

        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();

        return splitmix64(x + FIXED_RANDOM);

    }

};







void solve(){

    int n,x,y;

    cin>>n>>x>>y;

    if(n%2){

        for(int i=1;i<=n;i++){

            if(i==x) cout<<2<<" ";

            else{

                cout<<i%2<<" ";

            }

        }

    }

    else{

        if((y-x)%2){

            for(int i=1;i<=n;i++){

                if(i==x) cout<<2<<" ";

                else{

                    cout<<i%2<<" ";

                }

            }

        }

        else{

            for(int i=1;i<=n;i++) cout<<i%2<<" ";

        }

    }

    cout<<endl;

}



int32_t main() {    

    // fast io

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    int t=1;

    cin>>t;

    while(t--){

        solve();

    }

}
Problem: 2049C - MEX Cycle
Language: C++23 (GCC 14-64, msys2)

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



#define int long long

#define endl '\n'



using namespace std;



void sorter(vector<int> &x){

    sort(x.begin(), x.end());

}



void rsorter(vector<int> &x){

    sort(x.rbegin(), x.rend());

}



struct custom_hash {

    static uint64_t splitmix64(uint64_t x) {

        // http://xorshift.di.unimi.it/splitmix64.c

        x += 0x9e3779b97f4a7c15;

        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;

        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;

        return x ^ (x >> 31);

    }



    size_t operator()(uint64_t x) const {

        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();

        return splitmix64(x + FIXED_RANDOM);

    }

};







void solve(){

    int n,x,y;

    cin>>n>>x>>y;

    if(n%2){

        for(int i=1;i<=n;i++){

            if(i==x) cout<<2<<" ";

            else{

                cout<<i%2<<" ";

            }

        }

    }

    else{

        if((y-x)%2==0){

            for(int i=1;i<=n;i++){

                if(i==x) cout<<2<<" ";

                else{

                    cout<<i%2<<" ";

                }

            }

        }

        else{

            for(int i=1;i<=n;i++) cout<<i%2<<" ";

        }

    }

    cout<<endl;

}



int32_t main() {    

    // fast io

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    int t=1;

    cin>>t;

    while(t--){

        solve();

    }

}

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



#define int long long

#define endl '\n'



using namespace std;



void sorter(vector<int> &x){

    sort(x.begin(), x.end());

}



void rsorter(vector<int> &x){

    sort(x.rbegin(), x.rend());

}



struct custom_hash {

    static uint64_t splitmix64(uint64_t x) {

        // http://xorshift.di.unimi.it/splitmix64.c

        x += 0x9e3779b97f4a7c15;

        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;

        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;

        return x ^ (x >> 31);

    }



    size_t operator()(uint64_t x) const {

        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();

        return splitmix64(x + FIXED_RANDOM);

    }

};







void solve(){

    int n,x,y;

    cin>>n>>x>>y;

    int off=0;

    if(n%2){

        for(int i=1;i<=n;i++){

            if(i==x){

                cout<<2<<" ";

                off=1;

            }

            else{

                cout<<(i+off)%2<<" ";

            }

        }

    }

    else{

        if((y-x)%2==0){

            for(int i=1;i<=n;i++){

                if(i==x){

                cout<<2<<" ";

                off=1;

            }

            else{

                cout<<(i+off)%2<<" ";

            }

            }

        }

        else{

            for(int i=1;i<=n;i++) cout<<i%2<<" ";

        }

    }

    cout<<endl;

}



int32_t main() {    

    // fast io

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    int t=1;

    cin>>t;

    while(t--){

        solve();

    }

}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
#ifdef DEBUG
constexpr bool debug = true;
#else
constexpr bool debug = false;
#endif
using namespace std;
using u64 = uint64_t;
using i64 = int64_t;
using u32 = uint32_t;

int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    u32 l,r; cin >> l >> r;
    u32 x = 1 << (31 - __builtin_clz(r));
    u32 y = x - 1;
    u32 z = 0;
    for (auto i = l; i <= r; i++) {
      if (i != x and i != y){
         z = i;
         break;
      }
    }
    if constexpr (debug) {
      u32 max = (1 << (32 - __builtin_clz(r))) -1;
      max <<= 1;
      printf("%u %u | ", max, (x^y)+(y^z)+(x^z));
    }
    printf("%u %u %u\n", x, y, z);
  }
}


Submission (verdict: Accepted):
#include <bits/stdc++.h>
#ifdef DEBUG
constexpr bool debug = true;
#else
constexpr bool debug = false;
#endif
using namespace std;
using u64 = uint64_t;
using i64 = int64_t;
using u32 = uint32_t;

int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    u32 l,r; cin >> l >> r;
    int k = 31 - __builtin_clz(l^r);
    u32 x = l | ((1<<k) - 1);
    u32 y = x + 1;
    u32 z = (x == l ? r : l);
    if constexpr (debug) {
      u32 max = (1 << k+1) -1;
      max <<= 1;
      printf("%u %u | ", max, (x^y)+(y^z)+(x^z));
    }
    printf("%u %u %u\n", x, y, z);
  }
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
#ifdef DEBUG
constexpr bool debug = true;
#else
constexpr bool debug = false;
#endif
using namespace std;
using u64 = uint64_t;
using i64 = int64_t;
using u32 = uint32_t;

int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    u32 l,r; cin >> l >> r;
    u32 x = 1 << (31 - __builtin_clz(r));
    u32 y = x - 1;
    u32 z;
    for (auto i = l; i <= r; i++) {
      if (i != x and i != y and i != 0){
         z = i;
         break;
      }
    }
    if constexpr (debug) {
      u32 max = (1 << (32 - __builtin_clz(r))) -1;
      max <<= 1;
      printf("%u %u | ", max, (x^y)+(y^z)+(x^z));
    }
    printf("%u %u %u\n", x, y, z);
  }
}


Submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
#ifdef DEBUG
constexpr bool debug = true;
#else
constexpr bool debug = false;
#endif
using namespace std;
using u64 = uint64_t;
using i64 = int64_t;
using u32 = uint32_t;

int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    u32 l,r; cin >> l >> r;
    u32 x = 1 << (31 - __builtin_clz(r));
    u32 y = x - 1;
    u32 z = 0;
    for (auto i = l; i <= r; i++) {
      if (i != x and i != y){
         z = i;
         break;
      }
    }
    if constexpr (debug) {
      u32 max = (1 << (32 - __builtin_clz(r))) -1;
      max <<= 1;
      printf("%u %u | ", max, (x^y)+(y^z)+(x^z));
    }
    printf("%u %u %u\n", x, y, z);
  }
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)


Submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
#ifdef DEBUG
constexpr bool debug = true;
#else
constexpr bool debug = false;
#endif
using namespace std;
using u64 = uint64_t;
using i64 = int64_t;
using u32 = uint32_t;

int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    u32 l,r; cin >> l >> r;
    u32 x = 1 << (31 - __builtin_clz(r));
    u32 y = x - 1;
    u32 z = y-1;
    if constexpr (debug) {
      u32 max = (1 << (32 - __builtin_clz(r))) -1;
      max <<= 1;
      printf("%u %u | ", max, (x^y)+(y^z)+(x^z));
    }
    printf("%u %u %u\n", x, y, z);
  }
}
Problem: 2057C - Trip to the Olympiad
Language: C++17 (GCC 7-32)

Previous submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
#ifdef DEBUG
constexpr bool debug = true;
#else
constexpr bool debug = false;
#endif
using namespace std;
using u64 = uint64_t;
using i64 = int64_t;
using u32 = uint32_t;

int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    u32 l,r; cin >> l >> r;
    u32 x = 1 << (31 - __builtin_clz(r));
    u32 y = x - 1;
    u32 z = y-1;
    if constexpr (debug) {
      u32 max = (1 << (32 - __builtin_clz(r))) -1;
      max <<= 1;
      printf("%u %u | ", max, (x^y)+(y^z)+(x^z));
    }
    printf("%u %u %u\n", x, y, z);
  }
}


Submission (verdict: Wrong answer on test 1):
#include <bits/stdc++.h>
#ifdef DEBUG
constexpr bool debug = true;
#else
constexpr bool debug = false;
#endif
using namespace std;
using u64 = uint64_t;
using i64 = int64_t;
using u32 = uint32_t;

int main() {
  int tc;
  cin >> tc;
  while (tc--) {
    u32 l,r; cin >> l >> r;
    u32 x = 1 << (31 - __builtin_clz(r));
    u32 y = x - 1;
    u32 z;
    for (auto i = l; i <= r; i++) {
      if (i != x and i != y and i != 0){
         z = i;
         break;
      }
    }
    if constexpr (debug) {
      u32 max = (1 << (32 - __builtin_clz(r))) -1;
      max <<= 1;
      printf("%u %u | ", max, (x^y)+(y^z)+(x^z));
    }
    printf("%u %u %u\n", x, y, z);
  }
}