KöMaL - Középiskolai Matematikai és Fizikai Lapok
Sign In
Sign Up
 Magyar
Information
Contest
Journal
Articles

 

Problem I. 130. (April 2006)

I. 130. Write your program to find anagrams in a given text. An anagram of a word is formed by rearranging its letters arbitrarily, as in earth and heart.

The name of the input and output text file is specified as the first and second parameter: for example, if we want to collect all anagrams of text.txt into anagrams.txt, then the following command is issued

i130.exe text.txt anagrams.txt

The input file contains at most 1000 words in some lines and separated by spaces. Each word has at most 30 letters without any special characters. Lower and upper case letters are considered the same.

Each line of the output file should contain a group of anagrams separated by spaces. The words are listed in alphabetic order in each group, and groups containing more words come first.

See the example.

The source code (i130.pas, i130.cpp, ...) is to be submitted.

(10 pont)

Deadline expired on 15 May 2006.


Sorry, the solution is available only in Hungarian. Google translation

i130.rar

i130-mintamegoldas.doc

i130-tesztadat.rar


Statistics:

13 students sent a solution.
10 points:Balambér Dávid, Gilián Zoltán, Györök Péter, Kiss Dániel Miklós, Ócsvári Ádám, Ozsvárt László, Szoldatics András, Véges Márton.
8 points:2 students.
7 points:1 student.
5 points:1 student.
0 point:1 student.

Our web pages are supported by:   Ericsson   Cognex   Emberi Erőforrás Támogatáskezelő   Emberi Erőforrások Minisztériuma   Nemzeti Tehetség Program    
MTA Energiatudományi Kutatóközpont   MTA Wigner Fizikai Kutatóközpont     Nemzeti
Kulturális Alap   ELTE   Morgan Stanley