/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Wrong Answer 1ms 532.0 KiB
#3 Wrong Answer 2ms 532.0 KiB

Code

/**
    Author : Abdullah Al Mahdi
    CF Handle: abdmahdi56
    Leading University,Sylhet

    Submitted on:
*/
#include <bits/stdc++.h>
#define endl '\n'
#define yes cout << "YES\n"
#define no cout << "NO\n"
#define ll long long
#define vi vector<ll>
#define all(v) v.begin(), v.end()
#define loop(i,n) for(int (i) = 0; (i) < (n); (i)++)

using namespace std;

void Bismillah() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
}

void solve() {
    int n;
    cin>>n;
    string s1,s2;
    cin>>s1>>s2;
    if (n == 1) {
        cout << (s1 == s2 ?"YES\n" :"NO\n");
        return;
    }
    if(n>=2){
    
    bool ok2=count(all(s2), '0') > 0 && count(all(s2), '1') > 0 ;
    
    if(ok2) yes;
    else no;
    }
}

int main() {
    Bismillah();
    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 15:07:02
Judged At
2026-01-06 15:07:02
Judged By
Score
0
Total Time
2ms
Peak Memory
532.0 KiB