From MAILER-DAEMON Sat Mar  3 09:50:58 2001
Date: 03 Mar 2001 09:50:58 -0500
From: Mail System Internal Data <MAILER-DAEMON@east.isx.com>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
X-IMAP: 0983631058 0000000000
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message.  It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

From judge@east.isx.com Thu Mar  1 19:34:32 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id TAA26568
	for <judge@east.isx.com>; Thu, 1 Mar 2001 19:34:29 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id TAA16094
	for <judge@east.isx.com>; Thu, 1 Mar 2001 19:48:52 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id TAA06234
	for judge@east.isx.com; Thu, 1 Mar 2001 19:48:49 -0500 (EST)
Date: Thu, 1 Mar 2001 19:48:49 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: wods
Message-ID: <20010301194849.A5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="VbJkn9YxBvnuCH5J"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 813


--VbJkn9YxBvnuCH5J
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--VbJkn9YxBvnuCH5J
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="words.java"

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

class  words
{
	

	public static void main(String[] args) 
	{
		BufferedReader in = new BufferedReader(new FileReader("words.in"));
		PrintWriter out = new PrintWriter(new FileWriter("words.out"));

		String line;
		StringTokenizer st;

		while((line = in.readLine()) != null) {
			st = new StringTokenizer(line, "aeiouyAEIOUY");
			if (st.countTokens() <= 1) {
				out.println(line + " is not legal");
			}
			else {
				out.println(line + " is legal");
			}
		}

		in.close();
		out.close();
	}
}

--VbJkn9YxBvnuCH5J--

From judge@east.isx.com Thu Mar  1 19:37:38 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id TAA26621
	for <judge@east.isx.com>; Thu, 1 Mar 2001 19:37:37 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id TAA16348
	for <judge@east.isx.com>; Thu, 1 Mar 2001 19:52:11 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id TAA06330
	for judge@east.isx.com; Thu, 1 Mar 2001 19:52:10 -0500 (EST)
Date: Thu, 1 Mar 2001 19:52:10 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: words 2
Message-ID: <20010301195209.B5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="qcHopEYAB45HaUaB"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 837


--qcHopEYAB45HaUaB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--qcHopEYAB45HaUaB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="words.java"

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

class  words
{
	

	public static void main(String[] args) throws Exception
	{
	
		
		
		BufferedReader in = new BufferedReader(new FileReader("words.in"));
		PrintWriter out = new PrintWriter(new FileWriter("words.out"));

		String line;
		StringTokenizer st;

		while((line = in.readLine()) != null) {
			st = new StringTokenizer(line, "aeiouyAEIOUY");
			if (st.countTokens() <= 1) {
				out.println(line + " is not legal");
			}
			else {
				out.println(line + " is legal");
			}
		}

		in.close();
		out.close();
	}
}

--qcHopEYAB45HaUaB--

From judge@east.isx.com Thu Mar  1 19:47:31 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id TAA26965
	for <judge@east.isx.com>; Thu, 1 Mar 2001 19:47:30 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id UAA17377
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:02:04 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id UAA06704
	for judge@east.isx.com; Thu, 1 Mar 2001 20:02:02 -0500 (EST)
Date: Thu, 1 Mar 2001 20:02:02 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: wildcard
Message-ID: <20010301200202.C5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="i7F3eY7HS/tUJxUd"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1189


--i7F3eY7HS/tUJxUd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--i7F3eY7HS/tUJxUd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="wildcard.java"

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

class  wildcard
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("wildcard.in"));
		PrintWriter out = new PrintWriter(new FileWriter("wildcard.out"));

		String line;
		String orig;
		StringTokenizer st;
		String pre, post;
		int n;

		while((line = in.readLine()) != null) {
			orig = line;
			st = new StringTokenizer(line, "*");
			if (st.countTokens() != 2) {
				throw new Exception("invalid *");
			}
			pre = st.nextToken();
			post = st.nextToken();

			line = in.readLine();
			n = Integer.parseInt(line);

			for (int i = 0; i < n; i++)
			{
				line = in.readLine();
				if (line.startsWith(pre) &&
					line.endsWith(post)) {
					out.println(orig + " matches " + line);
				}
				else {
					out.println(orig + " does not match " + line);
				}
			}

		}

		in.close();
		out.close();
	}
}

--i7F3eY7HS/tUJxUd--

From judge@east.isx.com Thu Mar  1 19:58:46 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id TAA27264
	for <judge@east.isx.com>; Thu, 1 Mar 2001 19:58:45 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id UAA18645
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:13:19 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id UAA07010
	for judge@east.isx.com; Thu, 1 Mar 2001 20:13:17 -0500 (EST)
Date: Thu, 1 Mar 2001 20:13:17 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: toys
Message-ID: <20010301201317.D5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="C+ts3FVlLX8+P6JN"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1391


--C+ts3FVlLX8+P6JN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--C+ts3FVlLX8+P6JN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="toys.java"

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

class toys
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("toys.in"));
		PrintWriter out = new PrintWriter(new FileWriter("toys.out"));

		String line;
		StringTokenizer st;

		while((line = in.readLine()) != null) {
			double spindle, yoyo, string;
			st = new StringTokenizer(line);
			if (st.countTokens() < 1) {
				break;
			}
			else {
				spindle = Double.parseDouble(st.nextToken());
			}

			line=in.readLine();
			st = new StringTokenizer(line);
			yoyo = Double.parseDouble(st.nextToken());

			line=in.readLine();
			st = new StringTokenizer(line);
			string = Double.parseDouble(st.nextToken());

			double turns = (string - (yoyo / 2)) / (Math.PI * spindle);
			String spaces = "                        ";

			DecimalFormat df = new DecimalFormat("0.00");
			String strturns = df.format(turns);

			out.println("Yo will make " + spaces.substring(0, 6 - strturns.length()) + strturns +
						" revolutions before jerking to a halt!");
		}

		in.close();
		out.close();
	}
}

--C+ts3FVlLX8+P6JN--

From judge@east.isx.com Thu Mar  1 20:02:19 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id UAA27567
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:02:18 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id UAA18960
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:16:52 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id UAA07090
	for judge@east.isx.com; Thu, 1 Mar 2001 20:16:51 -0500 (EST)
Date: Thu, 1 Mar 2001 20:16:51 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: words 3
Message-ID: <20010301201651.E5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="xJK8B5Wah2CMJs8h"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 987


--xJK8B5Wah2CMJs8h
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--xJK8B5Wah2CMJs8h
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="words.java"

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

class  words
{
	

	public static void main(String[] args) throws Exception
	{
	
		
		
		BufferedReader in = new BufferedReader(new FileReader("words.in"));
		PrintWriter out = new PrintWriter(new FileWriter("words.out"));

		String line;
		char vowels[] = {'a', 'e', 'i', 'o', 'u', 'y',
						 'A', 'E', 'I', 'O', 'U', 'Y'};

		while((line = in.readLine()) != null) {
			boolean found = false;
			for (int i = 0; i < 12; i++)
			{
				if (line.indexOf(vowels[i]) >= 0)
				{
					found = true;
					break;
				}
			}
		
			if (found) {
				out.println(line + " is legal");
			}
			else {
				out.println(line + " is not legal");
			}
		}

		in.close();
		out.close();
	}
}

--xJK8B5Wah2CMJs8h--

From judge@east.isx.com Thu Mar  1 20:08:23 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id UAA27647
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:08:22 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id UAA19275
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:22:56 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id UAA07318
	for judge@east.isx.com; Thu, 1 Mar 2001 20:22:55 -0500 (EST)
Date: Thu, 1 Mar 2001 20:22:55 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: wildcard
Message-ID: <20010301202254.F5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="0hHDr/TIsw4o3iPK"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1127


--0hHDr/TIsw4o3iPK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--0hHDr/TIsw4o3iPK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="wildcard.java"

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

class  wildcard
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("wildcard.in"));
		PrintWriter out = new PrintWriter(new FileWriter("wildcard.out"));

		String line;
		String orig;
		StringTokenizer st;
		String pre, post;
		int n;

		while((line = in.readLine()) != null) {
			orig = line;
			int idx = line.indexOf('*');
			pre = line.substring(0, idx);
			post = line.substring(idx + 1);
			
			line = in.readLine();
			n = Integer.parseInt(line);

			for (int i = 0; i < n; i++)
			{
				line = in.readLine();
				if ( line.startsWith(pre) &&
					line.endsWith(post)) {
					out.println(orig + " matches " + line);
				}
				else {
					out.println(orig + " does not match " + line);
				}
			}

		}

		in.close();
		out.close();
	}
}

--0hHDr/TIsw4o3iPK--

From judge@east.isx.com Thu Mar  1 20:36:10 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id UAA28692
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:36:08 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id UAA22544
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:50:43 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id UAA08211
	for judge@east.isx.com; Thu, 1 Mar 2001 20:50:42 -0500 (EST)
Date: Thu, 1 Mar 2001 20:50:42 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: wildcard
Message-ID: <20010301205042.G5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="2oox5VnwalALFvA7"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1204


--2oox5VnwalALFvA7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--2oox5VnwalALFvA7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="wildcard.java"

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

class  wildcard
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("wildcard.in"));
		PrintWriter out = new PrintWriter(new FileWriter("wildcard.out"));

		String line;
		String orig;
		StringTokenizer st;
		String pre, post;
		int n;

		while((line = in.readLine()) != null) {
			orig = line;
			int idx = line.indexOf('*');
			pre = line.substring(0, idx);
			post = line.substring(idx + 1);
			
			line = in.readLine();
			n = Integer.parseInt(line);

			for (int i = 0; i < n; i++)
			{
				line = in.readLine();
				if ( line.startsWith(pre) &&
					line.endsWith(post) && ( line.length() >= pre.length() + post.length() )) {
					out.println(orig + " matches " + line);
				}
				else {
					out.println(orig + " does not match " + line);
				}
			
			}
			out.println("");

		}

		in.close();
		out.close();
	}
}

--2oox5VnwalALFvA7--

From judge@east.isx.com Thu Mar  1 20:43:38 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id UAA29017
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:43:36 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id UAA23225
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:58:12 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id UAA08477
	for judge@east.isx.com; Thu, 1 Mar 2001 20:58:11 -0500 (EST)
Date: Thu, 1 Mar 2001 20:58:11 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: bingo
Message-ID: <20010301205810.H5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="hABqaeELJqnDDeDE"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 3003


--hABqaeELJqnDDeDE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--hABqaeELJqnDDeDE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bingo.java"

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

class  bingo
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("bingo.in"));
		PrintWriter out = new PrintWriter(new FileWriter("bingo.out"));

		String line;
		StringTokenizer st;

		while(true) {
			int[][] board = new int[5][5];
			boolean[][] picked = new boolean[5][5]
			for(int i=0; i<5; i++) {
				line = in.readLine();
				st = new StringTokenizer(line);
				if(st.countTokens() == 0) { 
					in.close();
					out.flush();
					out.close();
					System.exit(0);
				}

				for(int j=0; j<5; j++) {
					if(i != 2 && j != 2) {
						board[i][j] = Integer.parseInt(st.nextToken());
						picked[i][j] = false;
					}
				}
				picked[2][2] = true;
			}

			int numcalls = 0;
			boolean bingo = false;

			while(bingo != true) {


				line = in.readLine();
				st = new StringTokenizer(line);
				int position = Integer.parseInt(line);

				if (position == 0)
				{
					break;
				}
				numcalls++;

				for(int i=0; i<5; i++) {
					for(int j=0; j<5; j++) {
						if(i != 2 && j != 2) {
							if(board[i][j] == position) picked[i][j] = true;
						}
					}
				}

				if(bingo != true) {
					/*cols*/
					for(int i=0; i<5; i++) {
						if(picked[i][0] &&  picked[i][1] && picked[i][2] && picked[i][3] && picked[i][4]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[i][j] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*cols*/
				}

				if(bingo != true) {
					/*rows*/
					for(int i=0; i<5; i++) {
						if(picked[0][i] &&  picked[1][i] && picked[2][i] && picked[3][i] && picked[4][i]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[j][i] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*rows*/
				}

				if(bingo != true) {
					if(picked[0][0] && picked[1][1] && picked[2][2] && picked[3][3] && picked[4][4]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][j] + " ");
						}
						out.print("Free Space");
					}
				}

				if(bingo != true) {
					if(picked[0][4] && picked[1][3] && picked[2][2] && picked[3][1] && picked[4][0]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][4 - j] + " ");
						}
						out.print("Free Space");
					}
				}
				
			}

			if(!bingo) out.println("No Bingo");
			out.println("");
		}
	}
}

--hABqaeELJqnDDeDE--

From judge@east.isx.com Thu Mar  1 20:48:09 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id UAA29282
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:48:07 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id VAA23697
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:02:43 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id VAA08699
	for judge@east.isx.com; Thu, 1 Mar 2001 21:02:42 -0500 (EST)
Date: Thu, 1 Mar 2001 21:02:42 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: bingo 2
Message-ID: <20010301210242.I5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="72k7VsmfIboquFwl"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 3004


--72k7VsmfIboquFwl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--72k7VsmfIboquFwl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bingo.java"

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

class  bingo
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("bingo.in"));
		PrintWriter out = new PrintWriter(new FileWriter("bingo.out"));

		String line;
		StringTokenizer st;

		while(true) {
			int[][] board = new int[5][5];
			boolean[][] picked = new boolean[5][5];
			for(int i=0; i<5; i++) {
				line = in.readLine();
				st = new StringTokenizer(line);
				if(st.countTokens() == 0) { 
					in.close();
					out.flush();
					out.close();
					System.exit(0);
				}

				for(int j=0; j<5; j++) {
					if(i != 2 && j != 2) {
						board[i][j] = Integer.parseInt(st.nextToken());
						picked[i][j] = false;
					}
				}
				picked[2][2] = true;
			}

			int numcalls = 0;
			boolean bingo = false;

			while(bingo != true) {


				line = in.readLine();
				st = new StringTokenizer(line);
				int position = Integer.parseInt(line);

				if (position == 0)
				{
					break;
				}
				numcalls++;

				for(int i=0; i<5; i++) {
					for(int j=0; j<5; j++) {
						if(i != 2 && j != 2) {
							if(board[i][j] == position) picked[i][j] = true;
						}
					}
				}

				if(bingo != true) {
					/*cols*/
					for(int i=0; i<5; i++) {
						if(picked[i][0] &&  picked[i][1] && picked[i][2] && picked[i][3] && picked[i][4]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[i][j] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*cols*/
				}

				if(bingo != true) {
					/*rows*/
					for(int i=0; i<5; i++) {
						if(picked[0][i] &&  picked[1][i] && picked[2][i] && picked[3][i] && picked[4][i]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[j][i] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*rows*/
				}

				if(bingo != true) {
					if(picked[0][0] && picked[1][1] && picked[2][2] && picked[3][3] && picked[4][4]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][j] + " ");
						}
						out.print("Free Space");
					}
				}

				if(bingo != true) {
					if(picked[0][4] && picked[1][3] && picked[2][2] && picked[3][1] && picked[4][0]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][4 - j] + " ");
						}
						out.print("Free Space");
					}
				}
				
			}

			if(!bingo) out.println("No Bingo");
			out.println("");
		}
	}
}

--72k7VsmfIboquFwl--

From judge@east.isx.com Thu Mar  1 20:53:52 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id UAA29556
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:53:50 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id VAA24068
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:08:26 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id VAA08976
	for judge@east.isx.com; Thu, 1 Mar 2001 21:08:25 -0500 (EST)
Date: Thu, 1 Mar 2001 21:08:25 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: mouse
Message-ID: <20010301210825.J5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="rwbb4r/vLufKlfJs"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 2017


--rwbb4r/vLufKlfJs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--rwbb4r/vLufKlfJs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mouse.java"

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

class  mouse
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("wildcard.in"));
		PrintWriter out = new PrintWriter(new FileWriter("wildcard.out"));

		String line;
		StringTokenizer st;
		Vector keys;

		while((line = in.readLine()) != null) {
			keys = new Vector();
			st = new StringTokenizer(line);
			int m = Integer.parseInt(st.nextToken());
			int n = Integer.parseInt(st.nextToken());

			for (int i = 0;i < m ;i++ )
			{
				line = in.readLine();
				st = new StringTokenizer(line);
				char v = st.nextToken().charAt(0);
				int x = Integer.parseInt(st.nextToken());
				int y = Integer.parseInt(st.nextToken());
				MyKey tmp = new MyKey(v, x, y, x + 249, y + 249);
				keys.add(tmp);
			}

			for (int i = 0 ;i < n ; i++ )
			{
				line = in.readLine();
				st = new StringTokenizer(line);
				int x = Integer.parseInt(st.nextToken());
				int y = Integer.parseInt(st.nextToken());

				boolean found = false;
				for (int j = 0; j < keys.size();j++ )
				{
					MyKey tmp = (MyKey)(keys.elementAt(j));
					if (x >= tmp.x1 && x <= tmp.x2 && y >= tmp.y1 && y <= tmp.y2)
					{
						out.println("Beep.  The key selected at coordinate (" + x + ", " + y + ") " +
							"had \"" + tmp.value + "\" on it.");
						found = true;
						break;
					}
				
				}
				if (!found)
				{
					out.println("BOING!  The coordinate (" + x + ", " + y + ") does not correspond " +
							"to a key.");
				}
			}


		}

		in.close();
		out.close();
	}
}

class MyKey
{
	public char value;
	public int x1, y1, x2, y2;

	public MyKey(char V, int X1, int Y1, int X2, int Y2) {
		value = V;
		x1 = X1;
		x2 = X2;
		y1 = Y1;
		y2 = Y2;
	}
};

--rwbb4r/vLufKlfJs--

From judge@east.isx.com Thu Mar  1 20:55:06 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id UAA29593
	for <judge@east.isx.com>; Thu, 1 Mar 2001 20:55:05 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id VAA24164
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:09:41 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id VAA09003
	for judge@east.isx.com; Thu, 1 Mar 2001 21:09:40 -0500 (EST)
Date: Thu, 1 Mar 2001 21:09:40 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: bingo 3
Message-ID: <20010301210940.K5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="3xQkynibq3FKlJyM"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 3035


--3xQkynibq3FKlJyM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--3xQkynibq3FKlJyM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bingo.java"

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

class  bingo
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("bingo.in"));
		PrintWriter out = new PrintWriter(new FileWriter("bingo.out"));

		String line;
		StringTokenizer st;

		while(true) {
			int[][] board = new int[5][5];
			boolean[][] picked = new boolean[5][5];
			for(int i=0; i<5; i++) {
				line = in.readLine();
				st = new StringTokenizer(line);
				if(st.countTokens() == 0) { 
					in.close();
					out.flush();
					out.close();
					System.exit(0);
				}

				for(int j=0; j<5; j++) {
					if(i != 2 && j != 2) {
						board[i][j] = Integer.parseInt(st.nextToken());
						picked[i][j] = false;
					}
				}
				picked[2][2] = true;
				board[2][2] = 0;
			}

			int numcalls = 0;
			boolean bingo = false;

			while(bingo != true) {


				line = in.readLine();
				st = new StringTokenizer(line);
				int position = Integer.parseInt(st.nextToken());

				if (position == 0)
				{
					break;
				}
				numcalls++;

				for(int i=0; i<5; i++) {
					for(int j=0; j<5; j++) {
						if(i != 2 && j != 2) {
							if(board[i][j] == position) picked[i][j] = true;
						}
					}
				}

				if(bingo != true) {
					/*cols*/
					for(int i=0; i<5; i++) {
						if(picked[i][0] &&  picked[i][1] && picked[i][2] && picked[i][3] && picked[i][4]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[i][j] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*cols*/
				}

				if(bingo != true) {
					/*rows*/
					for(int i=0; i<5; i++) {
						if(picked[0][i] &&  picked[1][i] && picked[2][i] && picked[3][i] && picked[4][i]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[j][i] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*rows*/
				}

				if(bingo != true) {
					if(picked[0][0] && picked[1][1] && picked[2][2] && picked[3][3] && picked[4][4]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][j] + " ");
						}
						out.print("Free Space");
					}
				}

				if(bingo != true) {
					if(picked[0][4] && picked[1][3] && picked[2][2] && picked[3][1] && picked[4][0]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][4 - j] + " ");
						}
						out.print("Free Space");
					}
				}
				
			}

			if(!bingo) out.println("No Bingo");
			out.println("");
		}
	}
}

--3xQkynibq3FKlJyM--

From judge@east.isx.com Thu Mar  1 21:00:33 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA29931
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:00:31 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id VAA24581
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:15:07 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id VAA09195
	for judge@east.isx.com; Thu, 1 Mar 2001 21:15:06 -0500 (EST)
Date: Thu, 1 Mar 2001 21:15:05 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: mouse 2
Message-ID: <20010301211505.L5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="GeONROBiaq1zPAtT"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 2011


--GeONROBiaq1zPAtT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--GeONROBiaq1zPAtT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mouse.java"

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

class  mouse
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("mouse.in"));
		PrintWriter out = new PrintWriter(new FileWriter("mouse.out"));

		String line;
		StringTokenizer st;
		Vector keys;

		while((line = in.readLine()) != null) {
			keys = new Vector();
			st = new StringTokenizer(line);
			int m = Integer.parseInt(st.nextToken());
			int n = Integer.parseInt(st.nextToken());

			for (int i = 0;i < m ;i++ )
			{
				line = in.readLine();
				st = new StringTokenizer(line);
				char v = st.nextToken().charAt(0);
				int x = Integer.parseInt(st.nextToken());
				int y = Integer.parseInt(st.nextToken());
				MyKey tmp = new MyKey(v, x, y, x + 249, y + 249);
				keys.add(tmp);
			}

			for (int i = 0 ;i < n ; i++ )
			{
				line = in.readLine();
				st = new StringTokenizer(line);
				int x = Integer.parseInt(st.nextToken());
				int y = Integer.parseInt(st.nextToken());

				boolean found = false;
				for (int j = 0; j < keys.size();j++ )
				{
					MyKey tmp = (MyKey)(keys.elementAt(j));
					if (x >= tmp.x1 && x <= tmp.x2 && y >= tmp.y1 && y <= tmp.y2)
					{
						out.println("Beep.  The key selected at coordinate (" + x + ", " + y + ") " +
							"had \"" + tmp.value + "\" on it.");
						found = true;
						break;
					}
				
				}
				if (!found)
				{
					out.println("BOING!  The coordinate (" + x + ", " + y + ") does not correspond " +
							"to a key.");
				}
			}


		}

		in.close();
		out.close();
	}
}

class MyKey
{
	public char value;
	public int x1, y1, x2, y2;

	public MyKey(char V, int X1, int Y1, int X2, int Y2) {
		value = V;
		x1 = X1;
		x2 = X2;
		y1 = Y1;
		y2 = Y2;
	}
};

--GeONROBiaq1zPAtT--

From judge@east.isx.com Thu Mar  1 21:08:07 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA00052
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:08:04 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id VAA25336
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:22:40 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id VAA09477
	for judge@east.isx.com; Thu, 1 Mar 2001 21:22:39 -0500 (EST)
Date: Thu, 1 Mar 2001 21:22:39 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: mouse
Message-ID: <20010301212238.M5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="e8/wErwm0bqugfcz"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 2031


--e8/wErwm0bqugfcz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--e8/wErwm0bqugfcz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mouse.java"

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

class  mouse
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("mouse.in"));
		PrintWriter out = new PrintWriter(new FileWriter("mouse.out"));

		String line;
		StringTokenizer st;
		Vector keys;

		while((line = in.readLine()) != null) {
			keys = new Vector();
			st = new StringTokenizer(line);
			int m = Integer.parseInt(st.nextToken());
			int n = Integer.parseInt(st.nextToken());

			for (int i = 0;i < m ;i++ )
			{
				line = in.readLine();
				st = new StringTokenizer(line);
				char v = st.nextToken().charAt(0);
				int x = Integer.parseInt(st.nextToken());
				int y = Integer.parseInt(st.nextToken());
				MyKey tmp = new MyKey(v, x, y, x + 249, y + 249);
				keys.add(tmp);
			}

			for (int i = 0 ;i < n ; i++ )
			{
				line = in.readLine();
				st = new StringTokenizer(line);
				int x = Integer.parseInt(st.nextToken());
				int y = Integer.parseInt(st.nextToken());

				boolean found = false;
				for (int j = 0; j < keys.size();j++ )
				{
					MyKey tmp = (MyKey)(keys.elementAt(j));
					if (x >= tmp.x1 && x <= tmp.x2 && y >= tmp.y1 && y <= tmp.y2)
					{
						out.println("Beep.  The key selected at coordinate (" + x + ", " + y + ") " +
							"had \"" + tmp.value + "\" on it.");
						found = true;
						break;
					}
				
				}
				if (!found)
				{
					out.println("BOING!  The coordinate (" + x + ", " + y + ") does not correspond " +
							"to a key.");
				}
			}
			out.println("");


		}

		in.close();
		out.close();
	}
}

class MyKey
{
	public char value;
	public int x1, y1, x2, y2;

	public MyKey(char V, int X1, int Y1, int X2, int Y2) {
		value = V;
		x1 = X1;
		x2 = X2;
		y1 = Y1;
		y2 = Y2;
	}
};

--e8/wErwm0bqugfcz--

From judge@east.isx.com Thu Mar  1 21:11:11 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA00324
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:11:09 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id VAA25506
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:25:46 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id VAA09545
	for judge@east.isx.com; Thu, 1 Mar 2001 21:25:45 -0500 (EST)
Date: Thu, 1 Mar 2001 21:25:45 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: bingo 4
Message-ID: <20010301212544.N5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="mvuFargmsA+C2jC8"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 3173


--mvuFargmsA+C2jC8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--mvuFargmsA+C2jC8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bingo.java"

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

class  bingo
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("bingo.in"));
		PrintWriter out = new PrintWriter(new FileWriter("bingo.out"));

		String line;
		StringTokenizer st;

		while(true) {
			int[][] board = new int[5][5];
			boolean[][] picked = new boolean[5][5];
			for(int i=0; i<5; i++) {
				line = in.readLine();
				st = new StringTokenizer(line);
				if(st.countTokens() == 0) { 
					in.close();
					out.flush();
					out.close();
					System.exit(0);
				}

				for(int j=0; j<5; j++) {
					if(i != 2 && j != 2) {
						board[i][j] = Integer.parseInt(st.nextToken());
						picked[i][j] = false;
					}
				}
				picked[2][2] = true;
				board[2][2] = 0;
			}

			int numcalls = 0;
			boolean bingo = false;

			while(bingo != true) {


				line = in.readLine();
				st = new StringTokenizer(line);
				int position = Integer.parseInt(st.nextToken());

				if (position == 0)
				{
					break;
				}
				numcalls++;

				for(int i=0; i<5; i++) {
					for(int j=0; j<5; j++) {
						if(i != 2 && j != 2) {
							if(board[i][j] == position) picked[i][j] = true;
						}
					}
				}

				if(bingo != true) {
					/*cols*/
					for(int i=0; i<5; i++) {
						if(picked[i][0] &&  picked[i][1] && picked[i][2] && picked[i][3] && picked[i][4]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[i][j] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*cols*/
				}

				if(bingo != true) {
					/*rows*/
					for(int i=0; i<5; i++) {
						if(picked[0][i] &&  picked[1][i] && picked[2][i] && picked[3][i] && picked[4][i]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[j][i] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*rows*/
				}

				if(bingo != true) {
					if(picked[0][0] && picked[1][1] && picked[2][2] && picked[3][3] && picked[4][4]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][j] + " ");
						}
						out.print("Free Space");
					}
				}

				if(bingo != true) {
					if(picked[0][4] && picked[1][3] && picked[2][2] && picked[3][1] && picked[4][0]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][4 - j] + " ");
						}
						out.print("Free Space");
					}
				}
				
			}
			if(bingo) {
				do {
					line = in.readline();
					st = new StringTokenizer(line);
				} while ( !st.nextToken().equals("0") );
			}

			if(!bingo) out.println("No Bingo");
			out.println("");
		}
	}
}

--mvuFargmsA+C2jC8--

From judge@east.isx.com Thu Mar  1 21:13:33 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA00404
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:13:32 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id VAA25655
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:28:08 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id VAA09625
	for judge@east.isx.com; Thu, 1 Mar 2001 21:28:08 -0500 (EST)
Date: Thu, 1 Mar 2001 21:28:07 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: bingo 5
Message-ID: <20010301212807.O5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="l7GkBbkEatsaRqBf"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 3173


--l7GkBbkEatsaRqBf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--l7GkBbkEatsaRqBf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bingo.java"

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

class  bingo
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("bingo.in"));
		PrintWriter out = new PrintWriter(new FileWriter("bingo.out"));

		String line;
		StringTokenizer st;

		while(true) {
			int[][] board = new int[5][5];
			boolean[][] picked = new boolean[5][5];
			for(int i=0; i<5; i++) {
				line = in.readLine();
				st = new StringTokenizer(line);
				if(st.countTokens() == 0) { 
					in.close();
					out.flush();
					out.close();
					System.exit(0);
				}

				for(int j=0; j<5; j++) {
					if(i != 2 && j != 2) {
						board[i][j] = Integer.parseInt(st.nextToken());
						picked[i][j] = false;
					}
				}
				picked[2][2] = true;
				board[2][2] = 0;
			}

			int numcalls = 0;
			boolean bingo = false;

			while(bingo != true) {


				line = in.readLine();
				st = new StringTokenizer(line);
				int position = Integer.parseInt(st.nextToken());

				if (position == 0)
				{
					break;
				}
				numcalls++;

				for(int i=0; i<5; i++) {
					for(int j=0; j<5; j++) {
						if(i != 2 && j != 2) {
							if(board[i][j] == position) picked[i][j] = true;
						}
					}
				}

				if(bingo != true) {
					/*cols*/
					for(int i=0; i<5; i++) {
						if(picked[i][0] &&  picked[i][1] && picked[i][2] && picked[i][3] && picked[i][4]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[i][j] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*cols*/
				}

				if(bingo != true) {
					/*rows*/
					for(int i=0; i<5; i++) {
						if(picked[0][i] &&  picked[1][i] && picked[2][i] && picked[3][i] && picked[4][i]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[j][i] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*rows*/
				}

				if(bingo != true) {
					if(picked[0][0] && picked[1][1] && picked[2][2] && picked[3][3] && picked[4][4]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][j] + " ");
						}
						out.print("Free Space");
					}
				}

				if(bingo != true) {
					if(picked[0][4] && picked[1][3] && picked[2][2] && picked[3][1] && picked[4][0]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][4 - j] + " ");
						}
						out.print("Free Space");
					}
				}
				
			}
			if(bingo) {
				do {
					line = in.readLine();
					st = new StringTokenizer(line);
				} while ( !st.nextToken().equals("0") );
			}

			if(!bingo) out.println("No Bingo");
			out.println("");
		}
	}
}

--l7GkBbkEatsaRqBf--

From judge@east.isx.com Thu Mar  1 21:24:12 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA00952
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:24:10 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id VAA26221
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:38:47 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id VAA09916
	for judge@east.isx.com; Thu, 1 Mar 2001 21:38:46 -0500 (EST)
Date: Thu, 1 Mar 2001 21:38:46 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: bingo 6
Message-ID: <20010301213845.P5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="AFQGHouA0VN8Ovbt"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 3167


--AFQGHouA0VN8Ovbt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--AFQGHouA0VN8Ovbt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bingo.java"

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

class  bingo
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("bingo.in"));
		PrintWriter out = new PrintWriter(new FileWriter("bingo.out"));

		String line;
		StringTokenizer st;

		while(true) {
			int[][] board = new int[5][5];
			boolean[][] picked = new boolean[5][5];
			for(int i=0; i<5; i++) {
				line = in.readLine();

				if(line == null) { 
					in.close();
					out.flush();
					out.close();
					System.exit(0);
				}

				st = new StringTokenizer(line);


				for(int j=0; j<5; j++) {
					if(i != 2 && j != 2) {
						board[i][j] = Integer.parseInt(st.nextToken());
						picked[i][j] = false;
					}
				}
				picked[2][2] = true;
				board[2][2] = 0;
			}

			int numcalls = 0;
			boolean bingo = false;

			while(bingo != true) {


				line = in.readLine();
				st = new StringTokenizer(line);
				int position = Integer.parseInt(st.nextToken());

				if (position == 0)
				{
					break;
				}
				numcalls++;

				for(int i=0; i<5; i++) {
					for(int j=0; j<5; j++) {
						if(i != 2 && j != 2) {
							if(board[i][j] == position) picked[i][j] = true;
						}
					}
				}

				if(bingo != true) {
					/*cols*/
					for(int i=0; i<5; i++) {
						if(picked[i][0] &&  picked[i][1] && picked[i][2] && picked[i][3] && picked[i][4]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[i][j] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*cols*/
				}

				if(bingo != true) {
					/*rows*/
					for(int i=0; i<5; i++) {
						if(picked[0][i] &&  picked[1][i] && picked[2][i] && picked[3][i] && picked[4][i]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 && j != 2) out.print(board[j][i] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*rows*/
				}

				if(bingo != true) {
					if(picked[0][0] && picked[1][1] && picked[2][2] && picked[3][3] && picked[4][4]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][j] + " ");
						}
						out.print("Free Space");
					}
				}

				if(bingo != true) {
					if(picked[0][4] && picked[1][3] && picked[2][2] && picked[3][1] && picked[4][0]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][4 - j] + " ");
						}
						out.print("Free Space");
					}
				}
				
			}
			if(bingo) {
				do {
					line = in.readLine();
					st = new StringTokenizer(line);
				} while ( !st.nextToken().equals("0") );
			}

			if(!bingo) out.println("No Bingo");
			out.println("");
		}
	}
}

--AFQGHouA0VN8Ovbt--

From judge@east.isx.com Thu Mar  1 21:48:26 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA01688
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:48:25 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA27763
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:03:02 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA11003
	for judge@east.isx.com; Thu, 1 Mar 2001 22:03:00 -0500 (EST)
Date: Thu, 1 Mar 2001 22:03:00 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: digit question
Message-ID: <20010301220259.Q5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 107

If there are no possible digits, should an empty line be printed?
-- 
kirill mechitov
kirill@cc.gatech.edu

From judge@east.isx.com Thu Mar  1 21:52:28 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA01958
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:52:27 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA28172
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:07:04 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA11187
	for judge@east.isx.com; Thu, 1 Mar 2001 22:07:03 -0500 (EST)
Date: Thu, 1 Mar 2001 22:07:03 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: digit
Message-ID: <20010301220703.R5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="+S4DbcR7QPeSsP0V"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1143


--+S4DbcR7QPeSsP0V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--+S4DbcR7QPeSsP0V
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="digit.java"

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

class  digit
{
	BufferedReader in;
	PrintWriter out;

	public static void main(String[] args) throws Exception
	{
		in = new BufferedReader(new FileReader("digit.in"));
		out = new PrintWriter(new FileWriter("digit.out"));
		
		String on_digits[] = { "abcefg", "cf", "acdeg", "acdfg", "bcdf", "abdfg", "abdefg", 
							"acf", "abcdefg", "abcdfg" };
		String broken, on;

		while ((broken = in.readline()) != null) {
			on = in.readLine();
		
			for (int i = 0; i < 10; i++) {
				if (contains(on_digits[i], on) && contains(on + broken, on_digits[i]))
				{
					out.print("    " + i);
				}
				out.println("");
			}
		}

		in.close();
		out.close();
	}

	boolean contains(String s1, String s2) {
		for (int i = 0; i < s2.length(); i++) {
			if (s1.indexOf(s2.charAt(i)) < 0)
			{
				return false;
			}
		}
		return true;
	}
}

--+S4DbcR7QPeSsP0V--

From judge@east.isx.com Thu Mar  1 21:56:38 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA02029
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:56:35 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA28400
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:11:12 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA11418
	for judge@east.isx.com; Thu, 1 Mar 2001 22:11:11 -0500 (EST)
Date: Thu, 1 Mar 2001 22:11:11 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: covered
Message-ID: <20010301221111.S5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 42


-- 
kirill mechitov
kirill@cc.gatech.edu

From judge@east.isx.com Thu Mar  1 21:56:54 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA02033
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:56:53 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA28431
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:11:30 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA11435
	for judge@east.isx.com; Thu, 1 Mar 2001 22:11:29 -0500 (EST)
Date: Thu, 1 Mar 2001 22:11:29 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: digit
Message-ID: <20010301221129.T5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="GFHULmA0mO3kKGOo"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1157


--GFHULmA0mO3kKGOo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--GFHULmA0mO3kKGOo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="digit.java"

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

class  digit
{
	static BufferedReader in;
	static PrintWriter out;

	public static void main(String[] args) throws Exception
	{
		in = new BufferedReader(new FileReader("digit.in"));
		out = new PrintWriter(new FileWriter("digit.out"));
		
		String on_digits[] = { "abcefg", "cf", "acdeg", "acdfg", "bcdf", "abdfg", "abdefg", 
							"acf", "abcdefg", "abcdfg" };
		String broken, on;

		while ((broken = in.readline()) != null) {
			on = in.readLine();
		
			for (int i = 0; i < 10; i++) {
				if (contains(on_digits[i], on) && contains(on + broken, on_digits[i]))
				{
					out.print("    " + i);
				}
				out.println("");
			}
		}

		in.close();
		out.close();
	}

	boolean contains(String s1, String s2) {
		for (int i = 0; i < s2.length(); i++) {
			if (s1.indexOf(s2.charAt(i)) < 0)
			{
				return false;
			}
		}
		return true;
	}
}

--GFHULmA0mO3kKGOo--

From judge@east.isx.com Thu Mar  1 21:57:49 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id VAA02047
	for <judge@east.isx.com>; Thu, 1 Mar 2001 21:57:48 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA28490
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:12:25 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA11485
	for judge@east.isx.com; Thu, 1 Mar 2001 22:12:24 -0500 (EST)
Date: Thu, 1 Mar 2001 22:12:24 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: covered
Message-ID: <20010301221223.U5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="flpRHSNNLnUanxKW"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1924


--flpRHSNNLnUanxKW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--flpRHSNNLnUanxKW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="covered.java"

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

class covered
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("covered.in"));
		PrintWriter out = new PrintWriter(new FileWriter("covered.out"));

		String line;
		StringTokenizer st;

		while(true) {
			double x1, y1, x2, y2, x3, y3, x4, y4;
			double temp;
			double width, height;
			double xlow, xhigh, ylow, yhigh;

			line = in.readLine();
			if(line == null) { 
				in.close();
				out.flush();
				out.close();
				System.exit(0);
			}

			st = new StringTokenizer(line);

			x1 = Double.parseDouble(st.nextToken());
			y1 = Double.parseDouble(st.nextToken());
			x2 = Double.parseDouble(st.nextToken());
			y2 = Double.parseDouble(st.nextToken());
			x3 = Double.parseDouble(st.nextToken());
			y3 = Double.parseDouble(st.nextToken());
			x4 = Double.parseDouble(st.nextToken());
			y4 = Double.parseDouble(st.nextToken());

			if(x1 > x2) {
				temp = x1;
				x1 = x2;
				x2 = temp;
			}
			if(x3 > x4) {
				temp = x3;
				x3 = x4;
				x4 = temp;
			}
			if(y1 > y2) {
				temp = x1;
				y1 = y2;
				y2 = temp;
			}
			if(y3 > y4) {
				temp = x3;
				y3 = y4;
				y4 = temp;
			}

			xlow = Math.max(x3, x1);
			xhigh = Math.min(x4, x2);
			width = Math.max(xhigh - xlow, 0.0);

			ylow = Math.max(y3, y1);
			yhigh = Math.min(y4, y2);
			height = Math.max(yhigh - ylow, 0.0);

			double area = (x2 - x1) * (y2 - y1) + (x4 - x3)*(y4 - y3) - (width * height);
			
			DecimalFormat df = new DecimalFormat("0.000");
			String covarea = df.format(area);
			out.println("Covered Area = " + covarea);
		}
	}
}

--flpRHSNNLnUanxKW--

From judge@east.isx.com Thu Mar  1 22:02:41 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id WAA02387
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:02:40 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA28859
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:17:18 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA11712
	for judge@east.isx.com; Thu, 1 Mar 2001 22:17:14 -0500 (EST)
Date: Thu, 1 Mar 2001 22:17:14 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: digit
Message-ID: <20010301221714.V5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="uUozbLrG2OP+gMtx"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1159


--uUozbLrG2OP+gMtx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--uUozbLrG2OP+gMtx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="digit.java"

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

class  digit
{
	static BufferedReader in;
	static PrintWriter out;

	public static void main(String[] args) throws Exception
	{
		in = new BufferedReader(new FileReader("digit.in"));
		out = new PrintWriter(new FileWriter("digit.out"));
		
		String on_digits[] = { "abcefg", "cf", "acdeg", "acdfg", "bcdf", "abdfg", "abdefg", 
							"acf", "abcdefg", "abcdfg" };
		String broken, on;

		while ((broken = in.readLine()) != null) {
			on = in.readLine();
		
			for (int i = 0; i < 10; i++) {
				if ( contains(on_digits[i], on) && contains(on + broken, on_digits[i]) )
				{
					out.print("    " + i);
				}
				out.println("");
			}
		}

		in.close();
		out.close();
	}

	boolean contains(String s1, String s2) {
		for (int i = 0; i < s2.length(); i++) {
			if (s1.indexOf(s2.charAt(i)) < 0)
			{
				return false;
			}
		}
		return true;
	}
}

--uUozbLrG2OP+gMtx--

From judge@east.isx.com Thu Mar  1 22:08:54 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id WAA02458
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:08:53 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA29294
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:23:30 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA11961
	for judge@east.isx.com; Thu, 1 Mar 2001 22:23:29 -0500 (EST)
Date: Thu, 1 Mar 2001 22:23:29 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: digit
Message-ID: <20010301222328.W5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="7XuS4gr/+Xj300Yp"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1172


--7XuS4gr/+Xj300Yp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--7XuS4gr/+Xj300Yp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="digit.java"

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

class  digit
{
	static BufferedReader in;
	static PrintWriter out;

	public static void main(String[] args) throws Exception
	{
		in = new BufferedReader(new FileReader("digit.in"));
		out = new PrintWriter(new FileWriter("digit.out"));
		
		String on_digits[] = { "abcefg", "cf", "acdeg", "acdfg", "bcdf", "abdfg", "abdefg", 
							"acf", "abcdefg", "abcdfg" };
		String broken, on;

		while ((broken = in.readLine()) != null) {
			on = in.readLine();
		
			for (int i = 0; i < 10; i++) {
				if ( contains(on_digits[i], on) && contains(on + broken, on_digits[i]) )
				{
					out.print("    " + i);
				}
			}
			out.println("");
		}

		in.close();
		out.close();
	}

	public static boolean contains(String s1, String s2) {
		for (int i = 0; i < s2.length(); i++) {
			if (s1.indexOf(s2.charAt(i)) < 0)
			{
				return false;
			}
		}
		return true;
	}
}

--7XuS4gr/+Xj300Yp--

From judge@east.isx.com Thu Mar  1 22:19:12 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id WAA03018
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:19:11 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA00162
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:33:49 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA12281
	for judge@east.isx.com; Thu, 1 Mar 2001 22:33:48 -0500 (EST)
Date: Thu, 1 Mar 2001 22:33:47 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: bingo
Message-ID: <20010301223347.X5835@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="rUGnr7B6Y4qPBmNO"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 3167


--rUGnr7B6Y4qPBmNO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--rUGnr7B6Y4qPBmNO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bingo.java"

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

class  bingo
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("bingo.in"));
		PrintWriter out = new PrintWriter(new FileWriter("bingo.out"));

		String line;
		StringTokenizer st;

		while(true) {
			int[][] board = new int[5][5];
			boolean[][] picked = new boolean[5][5];
			for(int i=0; i<5; i++) {
				line = in.readLine();

				if(line == null) { 
					in.close();
					out.flush();
					out.close();
					System.exit(0);
				}

				st = new StringTokenizer(line);


				for(int j=0; j<5; j++) {
					if(i != 2 || j != 2) {
						board[i][j] = Integer.parseInt(st.nextToken());
						picked[i][j] = false;
					}
				}
				picked[2][2] = true;
				board[2][2] = 0;
			}

			int numcalls = 0;
			boolean bingo = false;

			while(bingo != true) {


				line = in.readLine();
				st = new StringTokenizer(line);
				int position = Integer.parseInt(st.nextToken());

				if (position == 0)
				{
					break;
				}
				numcalls++;

				for(int i=0; i<5; i++) {
					for(int j=0; j<5; j++) {
						if(i != 2 || j != 2) {
							if(board[i][j] == position) picked[i][j] = true;
						}
					}
				}

				if(bingo != true) {
					/*cols*/
					for(int i=0; i<5; i++) {
						if(picked[i][0] &&  picked[i][1] && picked[i][2] && picked[i][3] && picked[i][4]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 || j != 2) out.print(board[i][j] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*cols*/
				}

				if(bingo != true) {
					/*rows*/
					for(int i=0; i<5; i++) {
						if(picked[0][i] &&  picked[1][i] && picked[2][i] && picked[3][i] && picked[4][i]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 || j != 2) out.print(board[j][i] + " ");
							}
							if(i == 2) out.print("Free Space");
						}
					}/*rows*/
				}

				if(bingo != true) {
					if(picked[0][0] && picked[1][1] && picked[2][2] && picked[3][3] && picked[4][4]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][j] + " ");
						}
						out.print("Free Space");
					}
				}

				if(bingo != true) {
					if(picked[0][4] && picked[1][3] && picked[2][2] && picked[3][1] && picked[4][0]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][4 - j] + " ");
						}
						out.print("Free Space");
					}
				}
				
			}
			if(bingo) {
				do {
					line = in.readLine();
					st = new StringTokenizer(line);
				} while ( !st.nextToken().equals("0") );
			}

			if(!bingo) out.println("No Bingo");
			out.println("");
		}
	}
}

--rUGnr7B6Y4qPBmNO--

From judge@east.isx.com Thu Mar  1 22:31:12 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id WAA03593
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:31:11 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA00859
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:45:49 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA12879
	for judge@east.isx.com; Thu, 1 Mar 2001 22:45:48 -0500 (EST)
Date: Thu, 1 Mar 2001 22:45:48 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: bingo
Message-ID: <20010301224547.A12293@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="jI8keyz6grp/JLjh"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 3220


--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--jI8keyz6grp/JLjh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bingo.java"

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

class  bingo
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("bingo.in"));
		PrintWriter out = new PrintWriter(new FileWriter("bingo.out"));

		String line;
		StringTokenizer st;

		while(true) {
			int[][] board = new int[5][5];
			boolean[][] picked = new boolean[5][5];
			for(int i=0; i<5; i++) {
				line = in.readLine();

				if(line == null) { 
					in.close();
					out.flush();
					out.close();
					System.exit(0);
				}

				st = new StringTokenizer(line);


				for(int j=0; j<5; j++) {
					if(i != 2 || j != 2) {
						board[i][j] = Integer.parseInt(st.nextToken());
						picked[i][j] = false;
					}
				}
				picked[2][2] = true;
				board[2][2] = 0;
			}

			int numcalls = 0;
			boolean bingo = false;

			while(bingo != true) {


				line = in.readLine();
				st = new StringTokenizer(line);
				int position = Integer.parseInt(st.nextToken());

				if (position == 0)
				{
					break;
				}
				numcalls++;

				for(int i=0; i<5; i++) {
					for(int j=0; j<5; j++) {
						if(i != 2 || j != 2) {
							if(board[i][j] == position) picked[i][j] = true;
						}
					}
				}

				if(bingo != true) {
					/*cols*/
					for(int i=0; i<5; i++) {
						if(picked[i][0] &&  picked[i][1] && picked[i][2] && picked[i][3] && picked[i][4]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 || j != 2) out.print(board[i][j] + " ");
							}
							if(i == 2) out.print("Free Space");
							out.println("");
						}
					}/*cols*/
				}

				if(bingo != true) {
					/*rows*/
					for(int i=0; i<5; i++) {
						if(picked[0][i] &&  picked[1][i] && picked[2][i] && picked[3][i] && picked[4][i]) {
							bingo = true;
							out.println("BINGO! after " + numcalls + " calls");
							for(int j=0; j<5; j++) {
								if(i != 2 || j != 2) out.print(board[j][i] + " ");
							}
							if(i == 2) out.print("Free Space");
							out.println("");
						}
					}/*rows*/
				}

				if(bingo != true) {
					if(picked[0][0] && picked[1][1] && picked[2][2] && picked[3][3] && picked[4][4]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][j] + " ");
						}
						out.println("Free Space");
					}
				}

				if(bingo != true) {
					if(picked[0][4] && picked[1][3] && picked[2][2] && picked[3][1] && picked[4][0]) {
						bingo = true;
						out.println("BINGO! after " + numcalls + " calls");
						for(int j=0; j<5; j++) {
							if(j != 2) out.print(board[j][4 - j] + " ");
						}
						out.println("Free Space");
					}
				}
				
			}
			if(bingo) {
				do {
					line = in.readLine();
					st = new StringTokenizer(line);
				} while ( !st.nextToken().equals("0") );
			}

			if(!bingo) out.println("No Bingo.");
			out.println("");
		}
	}
}

--jI8keyz6grp/JLjh--

From judge@east.isx.com Thu Mar  1 22:32:04 2001 -0500
Status: R
X-Status: A
X-Keywords:
Received: from burdell.cc.gatech.edu (burdell.cc.gatech.edu [130.207.3.207])
	by east.isx.com (8.9.3+Sun/8.9.3) with ESMTP id WAA03617
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:32:01 -0500 (EST)
Received: from felix.cc.gatech.edu (felix.cc.gatech.edu [130.207.107.11])
	by burdell.cc.gatech.edu (8.9.1/8.9.3) with ESMTP id WAA00915
	for <judge@east.isx.com>; Thu, 1 Mar 2001 22:46:39 -0500 (EST)
Received: (from kirill@localhost)
	by felix.cc.gatech.edu (8.9.3+Sun/8.9.1) id WAA12942
	for judge@east.isx.com; Thu, 1 Mar 2001 22:46:38 -0500 (EST)
Date: Thu, 1 Mar 2001 22:46:37 -0500
From: Kirill Mechitov <kirill@cc.gatech.edu>
To: judge@east.isx.com
Subject: covered 2
Message-ID: <20010301224637.B12293@cc.gatech.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="ZoaI/ZTpAVc4A5k6"
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Content-Length: 1924


--ZoaI/ZTpAVc4A5k6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


-- 
kirill mechitov
kirill@cc.gatech.edu

--ZoaI/ZTpAVc4A5k6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="covered.java"

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

class covered
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader in = new BufferedReader(new FileReader("covered.in"));
		PrintWriter out = new PrintWriter(new FileWriter("covered.out"));

		String line;
		StringTokenizer st;

		while(true) {
			double x1, y1, x2, y2, x3, y3, x4, y4;
			double temp;
			double width, height;
			double xlow, xhigh, ylow, yhigh;

			line = in.readLine();
			if(line == null) { 
				in.close();
				out.flush();
				out.close();
				System.exit(0);
			}

			st = new StringTokenizer(line);

			x1 = Double.parseDouble(st.nextToken());
			y1 = Double.parseDouble(st.nextToken());
			x2 = Double.parseDouble(st.nextToken());
			y2 = Double.parseDouble(st.nextToken());
			x3 = Double.parseDouble(st.nextToken());
			y3 = Double.parseDouble(st.nextToken());
			x4 = Double.parseDouble(st.nextToken());
			y4 = Double.parseDouble(st.nextToken());

			if(x1 > x2) {
				temp = x1;
				x1 = x2;
				x2 = temp;
			}
			if(x3 > x4) {
				temp = x3;
				x3 = x4;
				x4 = temp;
			}
			if(y1 > y2) {
				temp = y1;
				y1 = y2;
				y2 = temp;
			}
			if(y3 > y4) {
				temp = y3;
				y3 = y4;
				y4 = temp;
			}

			xlow = Math.max(x3, x1);
			xhigh = Math.min(x4, x2);
			width = Math.max(xhigh - xlow, 0.0);

			ylow = Math.max(y3, y1);
			yhigh = Math.min(y4, y2);
			height = Math.max(yhigh - ylow, 0.0);

			double area = (x2 - x1) * (y2 - y1) + (x4 - x3)*(y4 - y3) - (width * height);
			
			DecimalFormat df = new DecimalFormat("0.000");
			String covarea = df.format(area);
			out.println("Covered Area = " + covarea);
		}
	}
}

--ZoaI/ZTpAVc4A5k6--

