Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while (t--)
{
int n;
string s1,s2;
cin>>n>>s1>>s2;
int x=0;
for(int i=1;i<n;i++){
if((s1[i-1]=='0'&& s1[i]=='0')||(s2[i-1]=='1'&& s2[i]=='0') ){
x=1;
}
}
if(x==1)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
}
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:18:35
- Judged At
- 2026-01-06 15:18:35
- Judged By
- Score
- 0
- Total Time
- 4ms
- Peak Memory
- 532.0 KiB