KöMaL - Középiskolai Matematikai és Fizikai Lapok
 English
Információ
A lap
Pontverseny
Cikkek
Hírek
Fórum

Rendelje meg a KöMaL-t!

Kifordítható

tetraéder

VersenyVizsga portál

Kísérletek.hu

Matematika oktatási portál

S. 17. Write a program that plays the following word game. A list of words (at most 20) is read from the standard input, one word per line and ending in an empty line. Your program should display two sentences in two lines on the standard output, consisting of the given words in such an order that concatenation of words of the two sentences should yield the same string, with the very first letter being the only possible exception. The number of occurrences of a given word in the output should be equal to that of in the input list. It is of course ignored whether the solution conveys a meaning or not. If there is no solution, print ``No solution''.

See the examples (that even make sense in Hungarian).

The source code (s17.pas, s17.cpp, ...) and the documentation of your program should be submitted.

(10 points)

Deadline expired on 15 May 2006.


Statistics on problem S. 17.
6 students sent a solution.
10 points:Gilián Zoltán.
9 points:Engedy Balázs.
8 points:1 student.
7 points:1 student.
6 points:1 student.
4 points:1 student.


  • Problems in Information Technology of KöMaL, April 2006

  • Támogatóink:   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