Accepted
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
ll a,b,c;
cin>>a>>b>>c;
vector<ll>v;
set<ll>st;
st.insert(a);
st.insert(b);
st.insert(c);
for(auto it:st)
v.push_back(it);
if(st.size()==1)
cout<<"Equilateral\n";
else if(v[0]+v[1]>=v[2] && st.size()==2) cout<<"Isosceles\n";
else if(v[0]+v[1]>=v[2]) cout<<"Scalene\n";
else
cout<<"Not a triangle\n";
}
Information
- Submit By
- Type
- Submission
- Problem
- P1108 Triangle Triangle Triangle!!!
- Contest
- Brain Booster #8
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-02-17 14:33:52
- Judged At
- 2025-02-17 14:33:52
- Judged By
- Score
- 100
- Total Time
- 2ms
- Peak Memory
- 796.0 KiB