// UVa 11479 - Is this the easiest problem?
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
signed long long int a[3];
cin >> a[0] >> a[1] >> a[2];
sort(a, a + 3);
string sol;
if (a[0] + a[1] <= a[2])
sol = "Invalid";
else if (a[0] == a[1] && a[1] == a[2])
sol = "Equilateral";
else if (a[0] != a[1] && a[1] != a[2] && a[2] != a[0])
sol = "Scalene";
else
sol = "Isosceles";
cout << "Case " << i << ": " << sol << endl;
}
return 0;
}
Saturday, May 16, 2015
UVa 11479 - Is this the easiest problem?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment