1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| #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; }
|