Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
//freopen("input.txt","r", stdin);
int t;
cin >> t;
while (t--){
ll n, u =0,p = 0;
cin >> n;
string s, v;
cin >> s >>v;
for ( int i = 0; i < n;i++){
if ( s[i] == '1') u++;
}
for ( int i = 0; i < n;i++){
if ( v[i] == '1') p++;
}
if ( u > p) cout <<"NO" << endl; else cout <<"YES" << endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1233 B. Make Binary Strings Equal
- Contest
- Happy New Year 2026
- Language
- C++11 (G++ 13.2.0)
- Submit At
- 2026-01-06 17:05:36
- Judged At
- 2026-01-06 17:05:36
- Judged By
- Score
- 0
- Total Time
- 4ms
- Peak Memory
- 532.0 KiB