From 79070d372579a47d5d9aaece08493de47112559a Mon Sep 17 00:00:00 2001 From: Stefanus Du Toit Date: Tue, 16 Apr 2002 00:22:14 +0000 Subject: [PATCH] Added an old event. --- events.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/events.xml b/events.xml index c21e6e3..495b7d9 100755 --- a/events.xml +++ b/events.xml @@ -203,4 +203,49 @@ href="ja2morri@uwaterloo.ca">James Morrison.

Any comments from the newsgroup are welcome.

+ + + Practice for the ACM international programming + contest + +

Our ACM-Style practice contests involve answering five questions in three +hours. Solutions are written in Pascal, C or C++. Seven years in a row, +Waterloo's teams have been in the top ten at the world finals. +For more information, see +the contest web page.

+ +

Easy Question:

+

A palindrome is a sequence of letters that reads the same backwards and +forwards, such as ``Madam, I'm Adam'' (note that case doesn't matter and +only letters are important). Your task is to find the longest palindrome in +a line of text (if there is a tie, print the leftmost one).

+
+Input:                              Output:
+
+asfgjh12dsfgg kj0ab12321BA wdDwkj   abBA
+abcbabCdcbaqwerewq                  abCdcba
+
+ +

Hard Question:

+

An anagram is a word formed by reordering the letters of another word. +Find all sets of anagrams that exist within a large dictionary. The +input will be a sorted list of words (up to 4000 words), one per line. +Output each set of anagrams on a separate line. Each set should be +in alphabetical order, and all lines of sets should be in alphabetical +order. A word with no anagrams is a set of anagrams itself, and should +be displayed with no modifications.

+ +
+Input:      Output:
+
+post        post pots stop
+pots        start
+start
+stop
+
+
+
+ +