MIRRORED - Mirrored Pairs

no tags 

The letters b and d are mirror images of each other, as are p and q. No other pairs of letters are mirrors, except for letters like H that are mirrors of themselves, and what’s the interest in a pair that’s just two of the same letter? We refuse to count self-mirrors as mirrored pairs.


Input is a list of lines with two characters on each line. Your program should end immediately when it encounters a line with two spaces.


The first line of output should contain only Ready. For each pair of characters (prior to a pair of spaces), print the line Mirrored pair if the characters are mirrors, otherwise print the line Ordinary pair.



Ordinary pair
Mirrored pair
Ordinary pair
Mirrored pair

hide comments
ashley_96: 2017-05-29 03:34:59

If you look at input,it appears as if we have to terminate if we encounter enter key but read the question again.Cost me 5 WA's.Finally got it.

Wahyu Hendro Hartono: 2017-01-31 15:37:24

AC after case mistake hehe

rishabh_nitw: 2016-08-16 16:38:19

not at all useful to do other than input termination

shunmugavel: 2015-06-29 16:44:53

funny problem

karan: 2015-04-21 20:50:21

useless question :/

Unnati Gupta: 2015-04-10 15:57:59

bd, db, qp and pq are mirrored pairs. Got AC after several tries. All because of lack of info.

Last edit: 2015-04-10 15:59:52
Swapnil Borse: 2014-12-20 12:54:20

Just a word of caution, whenever there has to be a string written to the output always copy paste it from the sample output so that you never get a WA for silly reasons like missing caps or full stop or spelling mistake :P

aman kumar jha: 2013-07-31 19:27:36

waste of time. got WA (as "Ready" is with capital R :( ).
finally got AC.

reggaeguitar: 2013-02-15 23:42:02

The description does not make it clear that the mirrored pairs can be in any order. For example "qp" and "pq" would both be considered mirrored pairs. The description does not explain that case does not matter also. Very poor problem description. Also, why print ready on the first line? This minor detail cost me a couple WA

Last edit: 2013-02-15 23:42:57
Arkadiusz Bulski: 2012-08-02 21:21:00

I like this one, someone had imagination he he.

Added by:Daniel Gómez Didier
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:2007 PUJ - Circuito de Maratones ACIS / REDIS