'commit'
This commit is contained in:
23
TangDou/XiTi/1294.cpp
Normal file
23
TangDou/XiTi/1294.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
//cin读入优化
|
||||
std::ios::sync_with_stdio(false);
|
||||
//输入+输出重定向
|
||||
freopen("../1294.txt", "r", stdin);
|
||||
|
||||
int x1, y1, x2, y2;
|
||||
cin >> x1 >> y1 >> x2 >> y2;
|
||||
|
||||
if (x1 + 2 == x2 && y1 + 2 == y2) cout << "Yes" << endl;
|
||||
else if (x1 - 2 == x2 && y1 - 2 == y2) cout << "Yes" << endl;
|
||||
else if (x1 + 2 == x2 && y1 - 2 == y2) cout << "Yes" << endl;
|
||||
else if (x1 - 2 == x2 && y1 + 2 == y2) cout << "Yes" << endl;
|
||||
else cout << "No" << endl;
|
||||
|
||||
//关闭文件
|
||||
fclose(stdin);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user