HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Linear Data Structures: Arrays > problem:


50594 - Transformations

Guest
• Review clarifications (1)

Section problems

• 51131 - Running After a Thief
• 51143 - Departments Competition
• 50994 - The Most Crowded Station
• 51118 - Place 7 to the 5th position
• 51132 - Problem Solving Competition
• 51121 - Complexity power of a nu...
• 51119 - Evaluating Prefix expressions
• 50563 - Long Modulus
• 50594 - Transformations
• 51182 - Count and Sum 2
• 51193 - The max element of k-th co...
• 51194 - The difference between max...
• 51196 - The sum of two arrays
• 51197 - Even and odd Numbers
• 50468 - Draw Matrix - 2
• 50423 - Numbers square
• 50344 - Profit or Loss

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Transformations (USACO Olympiads)

Shqip

A square pattern of black and white tiles is transformed into another square. Write a program that will recognize the minimum transformation that has been applied to the original pattern given the following list of possible transformations:

    ROTATED 90 DEGREES: The pattern was rotated to the right 90 degrees.
    ROTATED 180 DEGREES: The pattern was rotated to the right 180 degrees.
    ROTATED 270 DEGREES: The pattern was rotated to the right 270 degrees.
    VERTICAL REFLECTION: The pattern was reflected vertically.
    NOT TRANSFORMED: The original pattern was not changed.
    IMPROPER TRANSFORMATION: The new pattern was not obtained by any of the above methods.

Test Case 1:
Input:
5
X...X ....X
.X... ...X.
...X. .X...
..X.X ..X..
....X XX..X

Output:
ROTATED 90 DEGREES


Test Case 2:
Input:
2
X. X.
.X .X

Output:
NOT TRANSFORMED


Test Case 3:
Input:
5
X.... .X...
.X... ..X..
.X... ..X..
...X. ....X
....X X....

Output:
IMPROPER TRANSFORMATION


Input specification
There will be a number (n) in the first line where 1 < n ≤ 10. The following n lines will contain two patterns where every line is composed of the characters "." or "X".

Output specification
Show only one of the transformation messages given above.
There will be only one transformation.

Для отправки решений необходимо выполнить вход.

www.contester.ru