Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ll t;
cin >> t;
while(t--){
ll n;
cin >> n;
string s1,s2;
cin >> s1 >> s2;
ll cnt1 = count(s1.begin(),s1.end(),'1');
ll cnt2 = count(s2.begin(),s2.end(),'1');
if((cnt1==n && cnt2!=n) || cnt1>cnt2){
cout << "NO\n";
}else{
cout << "YES\n";
}
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1233 B. Make Binary Strings Equal
- Contest
- Happy New Year 2026
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2026-01-06 15:56:46
- Judged At
- 2026-01-06 15:56:46
- Judged By
- Score
- 0
- Total Time
- 4ms
- Peak Memory
- 532.0 KiB