%%% 熬夜卷题
by creation_hy @ 2023-01-08 04:25:51
@[homoteam_ikun](/user/896912) 于是帮你看了一眼,下标难道不是 a[0] a[1] a[2] 吗?
by creation_hy @ 2023-01-08 04:26:57
@[homoteam_ikun](/user/896912) 楼上正解
by zcs_kim @ 2023-01-08 09:01:50
怎么哪里都有homo啊(恼
by zcs_kim @ 2023-01-08 09:02:43
@[creation_hy](/user/576378) 所以不要熬夜写题 脑子晕晕乎乎的写的全是错的 [但是还是有两个wa](https://www.luogu.com.cn/record/99002999)下面是修改后的代码
```cpp
#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main(){
int a[114],sum;
for(int i=0;i<3;i++){
cin>>a[i];
}
sort(a,a+3);
if(a[0]*a[0]+a[1]*a[1]>a[2]*a[2]){
cout<<"Acute triangle"<<endl;
}
if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
cout<<"Right triangle"<<endl;
}
if(a[0]*a[0]+a[1]*a[1]<a[2]*a[2]){
cout<<"Obtuse triangle"<<endl;
}
if(a[0]==a[1]||a[1]==a[2]||a[2]==a[0]){
cout<<"Isosceles triangle"<<endl;
}if(a[0]==a[1]&&a[1]==a[2]){
cout<<"Equilateral triangle"<<endl;
}if(a[0]+a[1]<=a[2]){
cout<<"Not triangle";
return 0;
}
return 0;
}
```
by homoteam_ikun @ 2023-01-08 11:45:57