题目描述
blablabla
include[HTML_REMOVED]
using namespace std;
int main(){
double a, b, c, t;
scanf("%lf%lf%lf", &a, &b, &c);
if(a < b){
t = a;
a = b;
b = t;
}
if(a < c){
t = a;
a = c;
c = t;
}
if(b < c){
t = b;
b = c;
c = t;
}
if(a >= b + c){
printf("NAO FORMA TRIANGULO");
}
else {
if(a * a == b * b + c * c) printf("TRIANGULO RETANGULO\n");
if(a * a > b * b + c * c) printf("TRIANGULO OBTUSANGULO\n");
if(a * a < b * b + c * c) printf("TRIANGULO ACUTANGULO\n");
if(a == b && b == c) printf("TRIANGULO EQUILATERO\n");
else if(a == b || b == c || a ==c)printf("TRIANGULO ISOSCELES");
}
return 0;
}
样例
blablabla
算法1
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla
算法2
(暴力枚举) $O(n^2)$
blablabla
时间复杂度
参考文献
C++ 代码
blablabla