0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-25 18:32:00 +00:00

P1170 兔八哥与猎人

R40527181
This commit is contained in:
Baoshuo Ren 2020-10-25 21:48:03 +08:00 committed by Baoshuo Ren
parent 9575e7d641
commit f1193a1568
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

21
problem/P1170/P1170.cpp Normal file
View File

@ -0,0 +1,21 @@
#include<bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
if(b == 0) {
return a;
}
return gcd(b, a%b);
}
int main() {
int t;
cin >> t;
while(t--) {
int ax, ay, bx, by;
cin >> ax >> ay >> bx >> by;
cout << (gcd(abs(ax-bx), abs(ay-by)) == 1 ? "no" : "yes") << endl;
}
return 0;
}