Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...)
#endif
void solve() {
int n;
string s,p;
cin >> n >> s >> p;
if(n==1){
cout << (s != p ? "NO" : "YES" ) << endl;
}
else if(n==2){
cout << (p == "00" || p== "11" ? "NO" : "YES" ) << endl;
}
else {
cout << "YES" << endl;
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int t; cin >> t;while (t--)
solve();
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 16:36:10
- Judged At
- 2026-01-06 16:36:10
- Judged By
- Score
- 0
- Total Time
- 3ms
- Peak Memory
- 532.0 KiB