文章
61
粉丝
137
获赞
18
访问
42.6k
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
for(int i = 0; i < n; i++){
int arr[3];
cin >> arr[0];
cin >> arr[1];
cin >> arr[2];
sort(arr, arr+3);
if(arr[0] + arr[1] <= arr[2]) {
cout << "-1" << endl;
continue;
}
int add = pow(arr[0], 2) + pow(arr[1], 2);
int z = pow(arr[2], 2);
if(add == z)
cout << "2" << endl;
else if(add > z)
cout << "1" << endl;
else if(add < z)
cout << "3" << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发