DMPG '16 B3 - CCO

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 256M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Bob is now so rich that his ambitions for his purchases have begun to spiral out of control. Everything that he once thought would be able to satisfy his needs no longer comes close. The only way to quench such lofty desires is by making money!

Bob is an expert in information security and is able to effectively cover the tracks of his underground affairs. In order to sustain such a herculean operation, he has hired you to help! Help Bob by printing out the design of the Canadian Counterfeiting Operation illegal tender.

Input Specification

Each test case will consist of 3 lines each containing 3 characters, representing the 3 by 3 design to be printed on the bill.

The line afterwards consists of 3 space separated integers V, H and W, representing the value of the bank note (100 \le V \le 1000) and the number of line breaks above and below the central design, and the number of spaces to the left and right of the central design (1 \le H, W \le 50) respectively.

Output Specification

Your program should output a rectangular array of characters consisting of = characters (ASCII 61) along the top and | characters (ASCII 124) down the sides.

The value of the counterfeit bill should appear justified in the top-left and bottom-right corners of the tender.

The 3 by 3 design given in the input should be centered in the bill, with H lines of space characters (ASCII 32) above and below it, and V space characters bordering it.

Sample Input

/ \
100 1 13

Sample Output

|100                          |
|             [|]             |
|             / \             |
|             \_/             |
|                          100|


There are no comments at the moment.