1.

/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, SS11
* Problem: 11734 - Big Number of Teams will Solve This
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2834
* @author Mitterreiter Christian
* @author Posselt Christian
* @version 1.0, 03/23/2011
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.096
*/

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

public class Main {

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

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

String line1 = "";
String line2 = "";

//Anzahl der Testfälle
int count = Integer.parseInt(br.readLine());
int step = 1;

while (count != step - 1) {

//Beide Textzeilen einlesen
line1 = br.readLine();
line2 = br.readLine();

// Textzeilen stimmen überein
if (line1.equals(line2)) {
System.out.println("Case " + step + ": Yes");
} else {

//Bei beiden Textzeilen die Leereichen entfernen und anschlie�end
//auf Gleichheit testen
String name1_temp = "";
String name2_temp = "";

for (int i = 0; i < line1.length(); i++) {
char c = line1.charAt(i);
if (c != ' ') {
name1_temp += c;
}
}

for (int i = 0; i < line2.length(); i++) {
char c = line2.charAt(i);
if (c != ' ') {
name2_temp += c;
}
}
if (name1_temp.equals(name2_temp)) {
System.out
.println("Case " + step + ": Output Format Error");
} else {
//Textzeilen sind unterschieldich
System.out.println("Case " + step + ": Wrong Answer");
}
}
step++;
}
}
}

2.

/**
* FWP, Ausgewhlte Probleme aus dem ACM Programming Contest, SS11
* Problem: 11734 Big Number of Teams will Solve This
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2834
*
* @author Beinhofer Christian
* @version 1.0, 23.03.2011
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.008
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char* argv[])
{
char buffer1[32];
char buffer2[32];
gets(buffer1);
int items = atoi(buffer1);

for (int i = 1; i <= items; i++)
{
bool spaces = false;
bool error = false;
char* c1 = gets(buffer1);
char* c2 = gets(buffer2);

for (; *c1 != '\0'; c1++, c2++)
{
while(*c1 == ' ')
{
c1++;
spaces = true;
}

if (*c1 != *c2)
{
error = true;
break;
}
}

while(*c1 == ' ')
{
c1++;
spaces = true;
}
DONE:
if(*c1 != *c2) error = true;

if(error) printf("Case %i: Wrong Answer\n", i);
else if(spaces) printf("Case %i: Output Format Error\n", i);
else printf("Case %i: Yes\n", i);
}

return 0;
}



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

1.


/**
* FWP, Ausgewhlte Probleme aus dem ACM Programming Contest, WS10/11
* Problem: 11734 Big Number of Teams will Solve This
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2834
*
* @author Fabian Liebl
* @version 1.0, 10/06/2010
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.088
*/

import java.io.*;

public class Main {

public static void main(String[] args) throws IOException {
BufferedReader inputReader = new BufferedReader(new InputStreamReader(System.in));
int numberOfTests = 0;
String line1 = "";
String line2 = "";

numberOfTests = Integer.parseInt(inputReader.readLine());

for (int i = 0; i < numberOfTests; i++) {
line1 = inputReader.readLine();
line2 = inputReader.readLine();

if (line1.equals(line2)) {
System.out.println("Case " + (i + 1) + ": Yes");
} else {
line1 = line1.replaceAll("\\s", "");
if (line1.equals(line2)) {
System.out.println("Case " + (i + 1) + ": Output Format Error");
} else {
System.out.println("Case " + (i + 1) + ": Wrong Answer");
}
}
}
}

}


2.

package BigNumberOfTeams;

import java.io.*;

/**
* FWP, Ausgewhlte Probleme aus dem ACM Programming Contest, WS10/11
* Problem: 11734 Big Number of Teams will Solve This
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2834
*
* @author Manuel Hager
* @version 1.0, 10/11/2010
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.092
*/
public class Main
{

private static String RemoveSpaces(String tmp)
{
String[] parts = tmp.split("\\s+");

StringBuilder builder = new StringBuilder();
for(String curr :parts)
builder.append(curr);

return builder.toString();
}

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

String line = reader.readLine();

if(line == null || !line.matches("\\d+"))
return;

int number = Integer.parseInt(line);

for(int i = 0; i < number; i++)
{
String firstLine = reader.readLine();
String secondLine = reader.readLine();

if(firstLine.equals(secondLine))
System.out.printf("Case %d: Yes%n", (i + 1) );

else if(firstLine.toLowerCase().equals(secondLine.toLowerCase()))
System.out.printf("Case %d: Wrong Answer%n", (i + 1));

else if(RemoveSpaces(firstLine).equals(secondLine))
{
System.out.printf("Case %d: Output Format Error%n", (i + 1));
}
else
System.out.printf("Case %d: Wrong Answer%n", (i + 1) );
}

reader.close();
}
catch(Exception ex) {

}
}
}