Mathematical and Physical Journal
for High Schools
Issued by the MATFUND Foundation
Already signed up?
New to KöMaL?
I want the old design back!!! :-)

Problem I. 112. (October 2005)

I. 112. Some unknown real numbers (at most 10) are denoted by the first few letters of the alphabet. The greater member of certain pairs of numbers is given. You should order the variables such that all given inequalities are satisfied. If there is no such ordering, print ``No solution''.

Your program should read the given relations from the standard input. Each line will contain a single inequality, without spaces between the variables and inequality sign.

The output should contain a possible ordering of the numbers in the same format as in the example.

InputOutput
A<B
A>C
C<D
C<A<B<D

The source code of the program (i112.pas, i112.c, ...) should be submitted.

(10 pont)

Deadline expired on November 15, 2005.


Statistics:

19 students sent a solution.
10 points:Balambér Dávid, Györök Péter, Kisfaludi-Bak Sándor, Ozsvárt László, Szoldatics András, Vincze János.
8 points:2 students.
7 points:2 students.
6 points:2 students.
5 points:3 students.
3 points:4 students.

Problems in Information Technology of KöMaL, October 2005