0x00 Link
-
Source
-AtCoder
-
Tag
-芝士水题
-
Time
- ∗ * ∗
0x01 Source Code
//
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
void solve() {
int n;
cin >> n;
string s, t;
cin >> s >> t;
for (int i = 0; i < n; i++) {
if (s[i] == '1') s[i] = 'l';
if (s[i] == '0') s[i] = 'o';
if (t[i] == '1') t[i] = 'l';
if (t[i] == '0') t[i] = 'o';
}
for (int i = 0; i < n; i++) {
if (s[i] != t[i]) {
cout << "No" << endl;
return ;
}
}
cout << "Yes" << endl;
}
signed main() {
IOS
int t = 1;
// cin >> t;
while (t--) solve();
return 0;
}
0x10 Diagram
-
404
0x11 Reference
-
404
作者 | 乐意奥AI