Problem: 2061D - Kevin and Numbers
Language: C++20 (GCC 13-64)

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

#define ll long long
#define vi vector<int>
#define vll vector<long long>
#define vvll vector<vector<long long>>
#define rsort(v) sort(all(v),greater<pr>());
#define minheap priority_queue<ll, vector<ll>, greater<ll>>
#define vb vector<bool>
#define vs vector<string>
#define vpll vector<pair<ll, ll>>
#define pr pair<ll,ll>
#define stkll stack<ll>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define maxi(v) *max_element(all(v))
#define mini(v) *min_element(all(v))
#define f1(i, j, n  ) for (ll i = j; i < n; i++)
#define f2(i, j, n  ) for (ll i = j; i >= n; i--)
#define print1(a) cout << a << endl;
#define print2(a, b) cout << a << " " << b << endl;
#define print3(a, b, c) cout << a << " " << b << " " << c << endl;
#define optimize()                    \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
#define mod(n) n % 1000000007
#define yes cout << "YES" << endl;
#define no cout << "NO" << endl;
#define umpll unordered_map<ll, ll>
#define umplb unordered_map<ll, bool>
#define umpcl unordered_map<char, ll>
#define umplc unordered_map<ll, char>
#define line cout << endl;
#define pvpl(v) f1(i,0,v.size()){cout<<v[i].first<<" "<<v[i].second<<endl;}
#define pvl(v) f1(i,0,v.size()){cout<<v[i]<<" ";}

int main(){
    optimize();
    ll size;
    cin>>size;
    while(size--){
        ll n,m;
        cin>>n>>m; 

        ll x;
        priority_queue<ll> a,b;

        f1(i,0,n){
            cin>>x;
            a.push(x);
        }

        f1(i,0,m){
            cin>>x;
            b.push(x);
        }
        ll i=n+m;
        while(!a.empty() && !b.empty() && i){
            ll t1=a.top(),t2=b.top();
            if(t1==t2){
                a.pop();
                b.pop();
            } else{
                b.pop();    
                b.push(ceil(float(t2)/2));
                b.push(floor(float(t2)/2));
                i--;
            }
        }

        if((!a.empty() || !b.empty())) no
        else yes

    }
}

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

#define ll long long
#define vi vector<int>
#define vll vector<long long>
#define vvll vector<vector<long long>>
#define rsort(v) sort(all(v),greater<pr>());
#define minheap priority_queue<ll, vector<ll>, greater<ll>>
#define vb vector<bool>
#define vs vector<string>
#define vpll vector<pair<ll, ll>>
#define pr pair<ll,ll>
#define stkll stack<ll>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define maxi(v) *max_element(all(v))
#define mini(v) *min_element(all(v))
#define f1(i, j, n  ) for (ll i = j; i < n; i++)
#define f2(i, j, n  ) for (ll i = j; i >= n; i--)
#define print1(a) cout << a << endl;
#define print2(a, b) cout << a << " " << b << endl;
#define print3(a, b, c) cout << a << " " << b << " " << c << endl;
#define optimize()                    \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
#define mod(n) n % 1000000007
#define yes cout << "YES" << endl;
#define no cout << "NO" << endl;
#define umpll unordered_map<ll, ll>
#define umplb unordered_map<ll, bool>
#define umpcl unordered_map<char, ll>
#define umplc unordered_map<ll, char>
#define line cout << endl;
#define pvpl(v) f1(i,0,v.size()){cout<<v[i].first<<" "<<v[i].second<<endl;}
#define pvl(v) f1(i,0,v.size()){cout<<v[i]<<" ";}

int main(){
    optimize();
    ll size;
    cin>>size;
    while(size--){
        ll n,m;
        cin>>n>>m; 

        ll x;
        priority_queue<ll> a,b;

        f1(i,0,n){
            cin>>x;
            a.push(x);
        }

        f1(i,0,m){
            cin>>x;
            b.push(x);
        }
        ll i=n;
        bool ck=0;
        while(!a.empty() && !b.empty() && i){
            ll t1=a.top(),t2=b.top();
            if(t1==t2){
                a.pop();
                b.pop();
            } else{
                b.pop();    
                b.push(ceil(float(t2)/2));
                b.push(floor(float(t2)/2));
                i--;
            }

            if(t1>t2){
                ck=1;
                break;
            }
        }

        if( ck || (!a.empty() || !b.empty())) no
        else yes

    }
}