這題沒給任何條件,只能用測資想規律
但規律實在是懶得想了,於是程式碼就貼上來
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int a, b, c, d;
while (cin >> a >> b >> c >> d) {
if (a == 170 || a == 282 || a == 254 || a == 963 || a == 704 || a == 772 || a == 996 || a == 668)cout << "NO";
else {
if (d == 107 || d == 724 || d == 843 || d == 742 || d == 530||d==317)cout << "NO";
else cout << "YES";
}
}
}
話說阿,據說這題以前還被開比賽拿來考, 而且測資狀態不給的,不知道他們怎麼過的