0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-24 18:08:47 +00:00
OI-codes/Luogu/contest/46177/T185757/T185757.cpp
Ren Baoshuo 605d9549b3
46177 【LGR-087】洛谷 7 月月赛 Div.2
T185757: R53089204
T185756: R53117077 [26' Code]
2021-07-14 19:12:38 +08:00

20 lines
519 B
C++

#include <bits/stdc++.h>
using namespace std;
int a1, b1, c1, d1, a2, b2, c2, d2;
int main() {
cin >> a1 >> b1 >> c1 >> d1 >> a2 >> b2 >> c2 >> d2;
if (a1 == a2 && b1 == b2 && c1 == c2 && d1 == d2) {
cout << "Yes" << endl;
} else if (a1 > 0 && b1 > 0 && c1 > 0 && d1 > 0 && a2 > 0 && b2 > 0 && c2 > 0 && d2 > 0) {
cout << "No" << endl;
} else if (!a1 + !b1 + !c1 + !d1 == 1 && d1 == 0) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
return 0;
}