-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path1593A.cpp
49 lines (44 loc) · 1.02 KB
/
1593A.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
#define debug(n) cout<<(n)<<endl;
const ll INF = 2e18 + 99;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin>>t;
int a, b, c;
while(t--){
cin>>a>>b>>c;
if(a > b && a > c){
cout<<(a - a)<<" "<<( a- b + 1)<<" "<<(a - c + 1)<<endl;
continue;
}
if(b > a && b > c){
cout<<(b - a + 1)<<" "<<( b- b)<<" "<<(b - c + 1)<<endl;
continue;
}
if(c > a && c > b){
cout<<(c - a + 1)<<" "<<( c- b + 1)<<" "<<(c - c)<<endl;
continue;
}
if(a == b && a > c){
cout<<(a - a + 1)<<" "<<( a- b + 1)<<" "<<(a - c + 1)<<endl;
continue;
}
if(b == c && b > a){
cout<<(b - a + 1)<<" "<<( b- b + 1)<<" "<<(b - c + 1)<<endl;
continue;
}
if(c == a && c > b){
cout<<(c - a + 1)<<" "<<( c- b + 1)<<" "<<(c - c + 1)<<endl;
continue;
}
if(a == b && b == c){
cout<<1<<" "<<1<<" "<<1<<endl;
continue;
}
}
}