mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 16:56:26 +00:00
CF1598A Computer Game
R62650380
This commit is contained in:
parent
590a0fbd21
commit
ea9b2ba878
25
Luogu/CF1598A/CF1598A.cpp
Normal file
25
Luogu/CF1598A/CF1598A.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user