From: eda803z@monu1.cc.monash.edu.au (Duc M. Ngo)
Subject: [MISC] ACS - 1992 University Programming Championship
Organization: Monash University, Australia.
Date: Tue, 1 Sep 1992 07:59:42 GMT

FYI:
----

Last Saturday 29/8/92, the Australian Computer Society held the 
1992 University Programming Championship competition at Royal 
Melbourne Institute of Technology (RMIT) - Melbourne.  There were
16 teams in Australia mostly from universities/institutions in Melbourne.
There was only one team each from Queensland, Sydney, and Adelaide.
There were also three teams from universities in New Zealand (Auckland, 
Duddin, and Massey (sp?))

Each team of 3 had to solve eight challenging problems, on *only* 1 PC, 
using Turbo C/Turbo Pascal, in 5 hours (from 11am - 4pm).

The final resutl:  The team from Sydney Uni - Sydney - NSW came first
with 3 problems solved, the runner-up is the Victoria Uni of Tech (VUT)
with also 3 problems solved but in more time.

I'll post all the 8 problems per kk's request. :)  

LIF

============================================================================

PROBLEM A:             ANAGRAM  CHECKER 
---------

It is often fun to see if rearranging the letters of a name gives
an  amusing  anagram.   For  example,  the letters 'WILLIAM SHAK-
ESPEAR' rearrange to form 'SPEAK REALISM AWHILE'.

Write a program that will read in a  dictionary  and  a  list  of
phrases  and  determine  which words from the dictionary, if any,
form anagrams of the given phrases.  Your program must  find  all
sets  of  words  in  the  dictionary which can be formed from the
letters in each phrase.  Do not include the set consisting of the
original words.  If no anagram is present, do not write anything,
not even a blank line.

Input will be from a file called PROBLEMA.DAT and  will  consiste
of  two parts.  The first part is the dictionary, the second part
is the set of phrases for which you need to find anagrams.   Each
part  of  the  file  will be terminated by a line consisting of a
single #.  The dictionary will be in alphabetic  order  and  will
contain  up  to  2000  words, one word per line.  The entire file
will be in uppercase, and no dictionary word or phrase will  con-
tain  more than 20 letters.  You cannot assume the language being
used is English.

Output will consist of a series of lines.  Each line will consist
of  the  original  phrase,  a  space,  an equal sign (=), another
space, and the list of words that together make up an anagram  of
the  original phrase, separated by exactly on space.  These words
must appear in alphabetic sequence.

Example 
INPUT 
ABC 
AND 
DEF 
DXZ 
K 
KX 
LJSRT 
LT 
PT 
PTYYWQ 
Y 
YWJSRQ 
ZD
ZZXY 
# 
ZZXY ABC DEF 
SXZYTWQP KLJ YRTD 
ZZXY YWJSRQ PTYYWQ ZZXY 
#

OUTPUT 
SXZYTWQP KLJ YRTD = DXZ K LJSRT PTYYWQ 
SXZYTWQP KLJ YRTD = DXZ K LT PT Y YWJSRQ  
SXZYTWQP KLJ YRTD = KX LJSRT PTYYWQ ZD
SXZYTWQP KLJ YRTD = KX LT PT Y YWJSRQ ZD

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

Problem C:               DOUBLE TIME 
---------

In 45 BC a standard calendar was adopted by Julius Caesar  - each
year  would  have 365 days, and every fourth year have an ex- tra
day - the 29th of February.  However  this   calendar   was   not
quite  accurate enogh to track the true solar year, and it became
noticeable that the onset of the seasons  was  shifting  steadily
through  the  year.   In  1582 Pope Gregory XIII ruled that a new
style calendar should take effect.  From then on,  century  years
would  only be leap years if they were divisible by 400. Further-
more the current year needed an adjustment to realign the  calen-
dar  with the seasons.  This new calendar, and the correction re-
quired, were adopted immediately  by  Roman  Catholic  countries,
where  the  day  following  Thursday 4 October 1582 was Friday 15
October 1582.  The British and Americans (among others)  did  not
follow  suit  until 1752, when Wednesday 2 September was followed
by Thursday 14 September (Russia did not change until  1918,  and
Greece  waited until 1923.)  Thus there was a long period of time
when history was recorded in two different styles.

Write a program that will read in a date, determine  which  style
it is in, and then convert it to the other style.

Input will be from a file call PROBLEMC.DAT and will consist of a
series  of  lines, each line containing a day and date (e.g. Fri-
day 25 December 1992).  Dates will be in the range 1 January 1600
to  31  December  2099,  although converted dates may lie outside
this range.  Note that all names of days and months  will  be  in
the  styles shown, i.e. the first letter will be capitalised with
the rest lower case.  The file will be terminated by a line  con-
taining a single '#'.

Output will consist of a series of lines, one for each  line   of
the  input.  Each line will consist of a date in the other style.
Use of the format and spacing shown in the example and  described
above.   Note  that  there must be exactly one space between each
pair of fields.  To distinguish between the styles, dates in  the
old  style  must have an asterisk ('*') immediately after the day
of the month (with no intervening space).  Note  that  this  will
not apply to the input.

  Example
  INPUT
  Saturday 29 August 1992
  Saturday 16 August 1992
  Wednesday 19 December 1991
  Monday 1 January 1900
  #

  OUTPUT
  Saturday 16* August 1992
  Saturday 29 August 1992
  Wednesday 1 January 1992
  Monday 20* December 1899

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

PS:  I'll post more later.  All typos are mine of course. :)

Newsgroups: soc.culture.vietnamese