Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
const long long mod = 10000007;
const long long INF = LLONG_MAX;
const int N = 1001000;
void solve () {
int n, x = 0;
string s, s1;
cin >> n >> s >> s1;
for (int i = 0; i < s1.length(); i++) {
if (s1[i] == '1') {
x++;
}
}
if (x == 0 || x == n) {
cout << "NO";
} else {
cout << "YES";
}
}
int main () {
ios::sync_with_stdio(false);
cin.tie(nullptr);
long long t;
cin >> t;
while (t--) {
solve();
cout << "\n";
}
return 0;
}
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:50:58
- Judged At
- 2026-01-06 15:50:58
- Judged By
- Score
- 0
- Total Time
- 2ms
- Peak Memory
- 532.0 KiB