题解 | 小红与gcd三角形
小红与gcd三角形
https://www.nowcoder.com/practice/bc2d5fd2d2094f5989c94e47d5c93332
显然充要条件是 x 与 y 相等,因为若不等,第三边必然小于等于 x 与 y 的绝对差
#include <iostream>
using namespace std;
int x;
int y;
void Solve() {
cin >> x >> y;
cout << (x == y ? "Yes\n" : "No\n");
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;
cin >> T;
while (T--) {
Solve();
}
return 0;
}
