SPOJ Problem Set (classical)
3378. Mirrored Pairs
Problem code: MIRRORED
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
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.
Output
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.
Example
Input: Fr qp HH db pq Output: Ready Ordinary pair Mirrored pair Ordinary pair Mirrored pair
All Submissions
Best Solutions
Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Apr 08, 2011
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
Your three comments could easily fit into one.
also, it is still like that with out the extra input.
hopefully someone will answer soon because it is 8 pm and i need to hand in the homework tomorrow.
Could this (or something similar) be it? Or am I just missing some obvious problem?
[he's NOT my friend]
[stranger]
jialeyu:
LOL
[he's my friend]
I don't get it. How do I do it in C++?
then you can just check if
break
That will end a while loop.
[he's my friend]