-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbee1045.cpp
More file actions
36 lines (29 loc) · 813 Bytes
/
Copy pathbee1045.cpp
File metadata and controls
36 lines (29 loc) · 813 Bytes
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
/*
* Contest : Beecrowd
* Problem : 1045 - Tipos de Triângulos
* Link : https://judge.beecrowd.com/pt/problems/view/1045
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fastio ios::sync_with_stdio(0); cin.tie(0);
int main() {
fastio
float in[3];
cin >> in[0] >> in[1] >> in[2];
sort(in, in + 3);
float a = in[2], b = in[1], c = in[0];
float aa = a * a, aux = b * b + c * c;
if (a >= b + c) {
cout << "NAO FORMA TRIANGULO\n";
return 0;
}
if (aa == aux) cout << "TRIANGULO RETANGULO\n";
else if (aa > aux) cout << "TRIANGULO OBTUSANGULO\n";
else
cout << "TRIANGULO ACUTANGULO\n";
set<float> s = {a, b, c};
if (s.size() == 1) cout << "TRIANGULO EQUILATERO\n";
else if (s.size() == 2) cout << "TRIANGULO ISOSCELES\n";
return 0;
}