1.

/**
* Angewandte Mathematik, SS11
* Problem: 11479 - Is this the easiest problem?
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=26&page=show_problem&problem=2474
*
* @author Markus Schöllner
* @author Andreas Maier
* @version 1.0, 04/28/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.132
*/

import java.io.*;
import java.util.*;

public class Main {

public static void main(String[] args) throws IOException {

Scanner scanner = new Scanner(System.in);

int cases =scanner.nextInt();

long a = 0,b = 0,c = 0;
long tmp1,tmp2,tmp3;

for(int y=1; y<=cases; y++){
tmp1 = scanner.nextLong();
tmp2 = scanner.nextLong();
tmp3 = scanner.nextLong();

if(tmp1 <= tmp2 && tmp1 <= tmp3) {
a = tmp1;
if(tmp2 <= tmp3){
b = tmp2;
c = tmp3;
}
else {
b = tmp3;
c = tmp2;
}
}
else {
if(tmp2 <= tmp1 && tmp2 <= tmp3) {
a = tmp2;
if(tmp1 <= tmp3){
b = tmp1;
c = tmp3;
}
else {
b = tmp3;
c = tmp1;
}
}
else {
if(tmp3 <= tmp1 && tmp3 <= tmp2) {
a = tmp3;
if(tmp1 <= tmp2){
b = tmp1;
c = tmp2;
}
else {
b = tmp2;
c = tmp1;
}
}
}
}

if(a+b <= c) System.out.print("Case "+y+": Invalid");
else {
if(a==b && b ==c) System.out.print("Case "+y+": Equilateral");
else{
if(a==b || a==c || b ==c) System.out.print("Case "+y+": Isosceles");
else{
if(a!=b && a!=c || b !=c) System.out.print("Case "+y+": Scalene");
}
}
}
System.out.println();
}
}
}


2.

/**
 * Angewandte Mathematik, SS11
 * Problem: 11479 Is this the easiest problem?
 * Link:
http://uva.onlinejudge.org/external/3/374.pdf
 *


 * @author Westerfield, Christopher
 * @author Gent Selmanaj
 * @author Marco Schuster
 * @version 1.0, 04/19/2011
 *
 * Method : Ad-Hoc
 * Status : Accepted
 * Runtime: 0.140
 */

import java.util.Scanner;



public class Main    {
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int count = sc.nextInt();
        String output="";
        for(int i = 0; i<=count; i++){


            if(sc.hasNext()){
                String[] content = sc.nextLine().split(" ");
                if(content.length!=3){
                    continue;
                }
                int a=Integer.parseInt(content[0]);


                int b=Integer.parseInt(content[1]);
                int c=Integer.parseInt(content[2]);
                if(a==b&&b==c){
                    System.out.println("Case "+i+": Equilateral");


                    continue;
                }
                if(
                    (a==b && (a+b)>c)
                    ||
                    (b==c && (b+c)>a)
                    ||


                    (a==c && (a+c)>b)
                ){
                    System.out.println("Case "+i+": Isosceles");
                    continue;
                }
                if(


                    ((a*a)==((b*b)+(c*c)))
                    ||
                    ((b*b)==((a*a)+(c*c)))
                    ||
                    ((c*c)==((b*b)+(a*a)))
                ){
                    System.out.println("Case "+i+": Scalene");


                    continue;
                }
                System.out.println("Case "+i+": Invalid");
            }
        }
        System.out.println(output);
    }
}

3.

/**
* Angewandte Mathematik, SS11
* Problem: 11479 Is this the easiest problem?
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=26&page=show_problem&problem=2474
*
* @author Weber Christian
* @author Waldleitner Christoph
* @author Marco Wolff
* @version 1.0, 03/05/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.132
*/

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;


public class IsthisTheEasiestProblem
{
public static void main(String[] args) throws IOException
{
BigInteger N, a, b, c;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

N = new BigInteger(br.readLine());
for (BigInteger i = new BigInteger("0"); i.compareTo(N) == -1; i = i.add(new BigInteger("1")))
{
String input = br.readLine();
a = new BigInteger(input.split(" ")[0]);
b = new BigInteger(input.split(" ")[1]);
c = new BigInteger(input.split(" ")[2]);

if (((a.add(b)).compareTo(c) == -1 || (a.add(b)).compareTo(c) == 0)||((a.add(c)).compareTo(b) == -1 || (a.add(c)).compareTo(b) == 0)||((b.add(c)).compareTo(a) == -1 || (b.add(c)).compareTo(a) == 0))
System.out.println("Case " + i.add(new BigInteger("1")) + ": Invalid");
else if (a.compareTo(b) == 0 && a.compareTo(c) == 0)
System.out.println("Case " + i.add(new BigInteger("1")) + ": Equilateral");
else if ((a.compareTo(b) == 0) || a.compareTo(c) == 0 || c.compareTo(b) == 0)
System.out.println("Case " + i.add(new BigInteger("1")) + ": Isosceles");
else
System.out.println("Case " + i.add(new BigInteger("1")) + ": Scalene");
}
}
}

4.

/**
* Angewandte Mathematik, SS11
* Problem: 11479 Is this the easiest problem?
* Link: http://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=2474
*
* @author Georg Weber, Daniel Brielbeck
* @version 1.0, 03/05/2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.108
*/
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {

public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
String input;
int count = Integer.parseInt(reader.readLine());

for (int i = 0; i < count; i++) {
input = reader.readLine();
if (input.equals(null))
break;
String[] side = input.split(" ");
Arrays.sort(side);
long a = Long.valueOf(side[0]);
long b = Long.valueOf(side[1]);
long c = Long.valueOf(side[2]);
if (a <= 0 || b <= 0 || c <= 0) {
System.out.println("Case " + (i + 1) + ": Invalid");
} else {
if ((a + b <= c || b + c <= a || a + c <= b)) {
System.out.println("Case " + (i + 1) + ": Invalid");
continue;
} else {
if (a == b && b == c) {
System.out.println("Case " + (i + 1) + ": Equilateral");
continue;
} else {
if (a == b || b == c || a == c) {
System.out.println("Case " + (i + 1)
+ ": Isosceles");
continue;
} else {
System.out.println("Case " + (i + 1) + ": Scalene");
continue;
}
}
}
}
}
}
}


-------------------


1.

/*
* ACM Contest training
* Problem: 11479 Is this the easiest problem?
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&page=show_problem&problem=2474
*
* @author Christoph Göttschkes
* @version 1.0, 10/20/2010
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.076
*/

import java.io.*;
import java.util.*;

class Main
{

public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

String line = reader.readLine();

while (true) {
StringTokenizer tokenizer = new StringTokenizer(line);
int testCases = Integer.parseInt(tokenizer.nextToken());

for (int i = 1; i <= testCases; i++) {
line = reader.readLine();
tokenizer = new StringTokenizer(line);
long a = Long.parseLong(tokenizer.nextToken());
long b = Long.parseLong(tokenizer.nextToken());
long c = Long.parseLong(tokenizer.nextToken());
long temp;

if (a > b) {
temp = a;
a = b;
b = temp;
}

if (a > c) {
temp = a;
a = c;
c = temp;
}

if (b > c) {
temp = b;
b = c;
c = temp;
}

System.out.print("Case " + i + ": ");

if (a + b <= c) {
System.out.println("Invalid");
} else {
if (a == b && a == c && c == b)
System.out.println("Equilateral");
else if (a == b || a == c || c == b)
System.out.println("Isosceles");
else
System.out.println("Scalene");
}
}
if (!reader.ready())
break;
line = reader.readLine();
}
}
}



2.
/** * FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS10
* * Problem: 11479 Is this the easiest problem?
* * Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=26&page=show_problem&problem=2474
* * Savkina Ekaterina
* * @version 1.0, 22/04/2010
* * Status : Accepted
* * Runtime: 0.112 */

import java.util.*;

public class triangle {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int count = sc.nextInt();

for (int i = 1; i <= count; i++) {
/*
* Einlesen von Längen der Seiten
*/
long a = sc.nextLong();
long b = sc.nextLong();
long c = sc.nextLong();

/*
* Die Längen der seiten werden in einem Array gespeichert.
* Array wird sortiert, damit kann man bestimmen, welche Seite die längste ist.
*/
long[] d = new long[3];

d[0] = a;
d[1] = b;
d[2] = c;
Arrays.sort(d);

/*
* Zuerst wird geprüft, ob es überhaupt ein Dreieck ist.
*/
if (d[0] + d[1] > d[2] && a > 0 && b > 0 && c > 0) {

/*
* Falls alle Seiten gleich sind ...
*/
if (a == b && b == c)
System.out.println("Case " + i + ": Equilateral");

/*
* Falls alle Seiten ungleich sind ...
*/
else if (a == b || b == c || a == c)
System.out.println("Case " + i + ": Isosceles");

else
System.out.println("Case " + i + ": Scalene");
}

/*
* Falls es kein Dreieck ist ...
*/
else
System.out.println("Case " + i + ": Invalid");

}

}
}