Tuesday, November 16

About ACM Competition.

This year my team ranked 38 out of 131 in the 2004 ACM East Central North AmericaRegional Programming Contest. This competition is funded by IBM, and the winner will go to the 2005 ACM Final in Shanghai. There're 72 colleges and universities throughout western Pennsylvania, Ohio, Michigan, eastern Ontario, and Indiana (excluding the Greater Chicago Metropolitan Area) in this competition.

You can read the problem set I met in this competition. Usually the problems are easy to understand, but hard to solve. For example, Prime Ring is a classic ACM problem:

Prime Ring Problem

A ring is composed of n (even number) circles as shown in diagram. Put natural numbers 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.

Note: the number of first circle should always be 1.

n (1 -- 16)

The output format is shown as sample below. Each row represents a series of circle numbers in the ring beginning from 1 clockwisely and anticlockwisely. The order of numbers must satisfy the above requirements.

You are to write a program that completes above process.

Sample Input


Sample Output

Case 1:
1 4 3 2 5 6
1 6 5 2 3 4

Case 2:
1 2 3 8 5 6 7 4
1 2 5 8 3 4 7 6
1 4 7 6 5 8 3 2
1 6 7 4 3 8 5 2

There're 8 problems in the competition, and you have 5 hours to work on them. You can use C, C++ or JAVA to solve the problems. Usually the source code of the answer is NO longer than 2 pages. You can visit a PROBLEM SET ARCHIVE at http://online-judge.uva.es/problemset/ and you can even submit your answer, and get feedback from the judges.

Every year Dr. Kobti organizes 2 seminars, in March and in September. In October, there'll be a Local Contest, and the first 2 teams can go to Oakvill for the Region Competition. If any of you are interested in the contest, you can find 2 friends and start working on it now.

You can read my answer for the Prime Ring.

Labels: ,


At November 27, 2004 6:51 AM, Blogger ALBERT LUO said...

Congratulations! Ben

At November 28, 2004 8:54 AM, Blogger Ben said...

Thanks, Albert. When will you build your blog?


Links to this post:

Create a Link

<< Home