題目連結:e521: 106 彰雲嘉區複賽 – Q1 三角形
簡單的三角形判別
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
ios::sync_with_stdio(0);cin.tie(0);
int n;
cin>>n;
while(n--){
int d[3];
for(int i=0;i<3;i++) cin>>d[i];
sort(d,d+3);
if(d[0]+d[1]<=d[2]){
cout<<0<<"\n";
}else{
cout<<1<<" ";
if(d[0]==d[1] || d[1]==d[2]) cout<<1;
else cout<<0;
cout<<"\n";
}
}
return 0;
}