1. C, Peter Schnitzler


/* Problem : 11479
* Author : Peter Schnitzler
* Status : AC
* Runtime : 0.000
*/

#include <stdio.h>

void sort(long long * tri)
{
if (tri[0] < tri[1])
{
long long temp = tri[0];
tri[0] = tri[1];
tri[1] = temp;
}

if (tri[1] < tri[2])
{
long long temp = tri[1];
tri[1] = tri[2];
tri[2] = temp;
}

if (tri[0] < tri[1])
{
long long temp = tri[0];
tri[0] = tri[1];
tri[1] = temp;
}
}


int main()
{
int count, in;

scanf("%d", &in);

for (count = 1; count <= in; count++)
{
long long tri[3];

scanf("%lld %lld %lld", tri, tri + 1, tri + 2);


sort(tri);

if (tri[0] >= tri[1] + tri[2] || tri[2] <= 0)
{
printf("Case %d: Invalid\n", count);
continue;
}

if (tri[0] == tri[1])
{
if (tri[1] == tri[2])
{
printf("Case %d: Equilateral\n", count);
continue;
}
else
{
printf("Case %d: Isosceles\n", count);
continue;
}
}

if (tri[1] == tri[2])
{
printf("Case %d: Isosceles\n", count);
continue;
}

printf("Case %d: Scalene\n", count);

}


return 0;
}



2. C, Doina Logofatu
/**
* ACM programming Contest WS 08/09
* UVa Status: Accepted
* Run Time: 0.000
* Programming Language: C
* @author Doina Logofatu logofatu@hm.edu
*/

#include <stdio.h>

int main() {
   long long a, b, c;
   int n, i;
   
   scanf("%d", &n);

   for(i=0; i<n; i++){
     scanf("%lld %lld %lld", &a, &b, &c);

     if(a>0 && b>0 && c>0 && a<b+c && b<a+c && c<a+b){
         if(a == b && a == c )  { printf("Case %d: Equilateral\n", i+1); continue;}
         if(a == b || a == c || b == c )  { printf("Case %d: Isosceles\n", i+1); continue;}
         printf("Case %d: Scalene\n", i+1); continue;
     }
     else{
         printf("Case %d: Invalid\n", i+1);
     }
   }
   return 0;
}