Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
#define int int64_t
#define el '\n'
void run_case(int tc) {
int n;
cin >> n;
string s, p;
cin >> s >> p;
cout << (s != p && (count(p.begin(),p.end(),'0') ^ count(p.begin(),p.end(),'1')) ? "NO\n" : "YES\n");
}
int32_t main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int _t = 1;
cin >> _t;
for (int i = 1; i <= _t; i++) {
run_case(i);
}
}
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:48:51
- Judged At
- 2026-01-06 15:48:51
- Judged By
- Score
- 0
- Total Time
- 1ms
- Peak Memory
- 532.0 KiB