Accepted
Code
#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define f first
#define s second
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
vector<ll> a(3);
cin >> a[0] >> a[1] >> a[2];
sort(a.begin(), a.end());
if (a[0] + a[1] <= a[2]){
cout << "Not a triangle";
return 0;
}
if (a[0] == a[1] && a[1] == a[2]){
cout << "Equilateral";
return 0;
}
if (a[0] == a[1] || a[1] == a[2]){
cout << "Isosceles";
return 0;
}
cout << "Scalene";
}
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:39:24
- Judged At
- 2025-02-17 14:39:24
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 764.0 KiB