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

Previous submission (verdict: Wrong answer on test 28):
#include "./bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int,int> pii;
typedef pair<long long,long long>pll;
typedef vector<pii> vpii;
#define REP(i,x,y) for(int i=x;i<y;i++)
#define F first
#define S second
#define PB push_back
#define PRES(c,x) ((c).find(x)!=(c).end())
#define MOD 1000000007
ll gcder(ll a, ll b) {
   if (b == 0)
   return a;
   return gcder(b, a % b);
}
void file_i_o(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // #ifndef ONLINE_JUDGE
    //     freeopen("input.txt","r",stdin);
    //     freeopen("output.txt","w",stdout);
    // #endif
}
int main(){
    file_i_o();
    ll t;cin >> t;
    while(t--){
        ll n,m;cin >> n >> m;
        multiset<ll>a,b;
        REP(i,0,n){
            ll x;cin >> x;
            a.insert(x);
        }
        REP(i,0,m){
            ll x;cin >> x;
            b.insert(x);
        }
        ll ops=0;
        while(b.size() && a.size()){
            //cout<<"In"<<endl;
            auto el=(--b.end());
            auto els=a.lower_bound(*el);
            if(els!=a.end()){
                a.erase(els);
                b.erase(el);
                continue;
            }
            if(ops<(n-m)){
            ll mid1=(*(el))/2;
            ll mid2=((*(el))+1)/2;
            b.insert(mid1);
            b.insert(mid2);
            b.erase(el);
            ops++;
            }else{
                break;
            }
        }
        bool ans=(!b.size() && !a.size());
        if(ans){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
    return 0;
}

Submission (verdict: Wrong answer on test 28):
#include "./bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int,int> pii;
typedef pair<long long,long long>pll;
typedef vector<pii> vpii;
#define REP(i,x,y) for(int i=x;i<y;i++)
#define F first
#define S second
#define PB push_back
#define PRES(c,x) ((c).find(x)!=(c).end())
#define MOD 1000000007
ll gcder(ll a, ll b) {
   if (b == 0)
   return a;
   return gcder(b, a % b);
}
void file_i_o(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // #ifndef ONLINE_JUDGE
    //     freeopen("input.txt","r",stdin);
    //     freeopen("output.txt","w",stdout);
    // #endif
}
int main(){
    file_i_o();
    ll t;cin >> t;
    while(t--){
        ll n,m;cin >> n >> m;
        multiset<ll>a,b;
        REP(i,0,n){
            ll x;cin >> x;
            a.insert(x);
        }
        REP(i,0,m){
            ll x;cin >> x;
            b.insert(x);
        }
        ll ops=0;
        while(b.size() && a.size()){
            //cout<<"In"<<endl;
            auto el=(--b.end());
            auto els=a.lower_bound(*el);
            if(els!=a.end()){
                a.erase(els);
                b.erase(el);
                continue;
            }
            if(ops<(n-m)){
            ll mid1=(*(el))/2;
            ll mid2=((*(el))+1)/2;
            b.insert(mid1);
            b.insert(mid2);
            b.erase(el);
            ops++;
            }else{
                break;
            }
        }
        bool ans=(!b.size() && !a.size() && (ops==(n-m)));
        if(ans){
            cout<<"Yes"<<endl;
        }else{
            cout<<"No"<<endl;
        }
    }
    return 0;
}