0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-14 16:18:49 +00:00

A - Computer Game

https://codeforces.com/contest/1598/submission/131422144
This commit is contained in:
Baoshuo Ren 2021-10-10 18:28:06 +08:00 committed by Baoshuo Ren
parent 88e10c9dba
commit f2c65886f9
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

25
CodeForces/1598/A/A.cpp Normal file
View File

@ -0,0 +1,25 @@
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
int t, n;
string s[2];
bool flag;
int main() {
std::ios::sync_with_stdio(false);
cin >> t;
while (t--) {
flag = true;
cin >> n >> s[0] >> s[1];
for (int i = 0; i < n; i++) {
if (s[0][i] == '1' && s[1][i] == '1') {
flag = false;
}
}
cout << (flag ? "YES" : "NO") << endl;
}
return 0;
}