题解
2024-03-15 20:35:06
发布于:上海
11阅读
0回复
0点赞
#include<iostream>
using namespace std;
int t,a,b,c;
int main(){
cin>>t;
while(t--){
cin>>a>>b>>c;
int minner = min(min(a,b),c);
if(a%minner||b%minner||c%minner)cout<<"NO\n";
else{
if(a/minner-1+b/minner-1+c/minner-1<=3)cout<<"YES\n";//经典植树问题,砍刀数=段数-1
else cout<<"NO\n";
}
}return 0;
}
这里空空如也
有帮助,赞一个