0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 03:31:59 +00:00

CF6A Triangle

R38989380
This commit is contained in:
Baoshuo Ren 2020-09-28 20:49:17 +08:00 committed by Baoshuo Ren
parent 938465fff6
commit 7a56a690a9
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

21
problem/CF6A/CF6A.cpp Normal file
View File

@ -0,0 +1,21 @@
// R38989380
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
// abc abd acd bcd
if (a + b > c && a + c > b && b + c > a || a + b > d && a + d > b && b + d > a || a + c > d && a + d > c && c + d > a || b + c > d && b + d > c && c + d > b) {
cout << "TRIANGLE" << endl;
}
else if (a + b >= c && a + c >= b && b + c >= a || a + b >= d && a + d >= b && b + d >= a || a + c >= d && a + d >= c && c + d >= a || b + c >= d && b + d >= c && c + d >= b) {
cout << "SEGMENT" << endl;
}
else {
cout << "IMPOSSIBLE" << endl;
}
return 0;
}