oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

maplename Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

maplename.html

Little Joseph is an avid MapleStory fan. He even plays MapleStory while he is supposed to be coding problems for the contest! While on his journey to fight the Pink Bean, he joins an expedition with all the high level Adventurers, Knights of Cygnus, Heroes and Resistance. He notices that all of them wear rings that will beautify how their name looks in game, and these decorations of the name are according to their classes.

Say there is a MapleStory character named JiaLing.

If JiaLing is an Adventurer (A), his name will be decorated with '-' for the top and bottom border, '|' for the left and right border and 'o' for the corners, like this:
o-------o
|JiaLing|
o-------o
If JiaLing is a Knight of Cygnus (K), his name will be decorated with '-' for the top and bottom border, '|' for the left and right border and 'x' for the corners, like this:
x-------x
|JiaLing|
x-------x
If JiaLing is a Hero (H), his name will be decorated with an alternate of 'x' and 'o', like this:
oxoxoxoxo
xJiaLingx
oxoxoxoxo
Note, if his name has even number of letters (e.g. JiaLing3), it will still be decorated in an alternate fashion like this:
oxoxoxoxox
xJiaLing3o
oxoxoxoxox
If JiaLing is a Resistance (R), his name will be decorated the same as (A) but there will be a '+' in the middle of the top and bottom border, like this:
o---+---o
|JiaLing|
o---+---o
Note, if his name has even number of letters (e.g. JiaLing3), the '+' will be on the left of the middle 2 characters like this:
o---+----o
|JiaLing3|
o---+----o
A MapleStory character (not necessarily JiaLing) wants to see how his name will look like wearing these different rings, and hence he wants you to output how his name will look like.

Input


The first line of input will be the class ring (A,K,H,R)
The second line of input will be the name of the character.

Output


Output the name in the decorated nameframe.

Sample Input 1


A
JiaLing

Sample Output 1


o-------o
|JiaLing|
o-------o

Tags

String Processing

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o maplename -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.