시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 1024 MB | 49 | 27 | 25 | 54.348% |
Write a program that will generate Square Designs like the ones below for any values of M and N (1 ≤ M ≤ 18; 1 ≤ N ≤ 18). Exactly ten spaces separate the pair of boxes and the left box has no spaces in front of it. There are neither "tabs" nor trailing spaces in the output.
Here is the output for M=5 and N=3:
+-----------+ +-------+ I-X-X-X-X-X-I I-X-X-X-I I-X-X-X-X-X-I I-X-X-X-I I-X-X-X-X-X-I I-X-X-X-I I-X-X-X-X-X-I +-------+ I-X-X-X-X-X-I +-----------+
This output contains no blank lines.
A single line containing two integers, M and N.
Several output lines that create the design as shown above.
2 6
+-----+ +-------------+ I-X-X-I I-X-X-X-X-X-X-I I-X-X-I I-X-X-X-X-X-X-I +-----+ I-X-X-X-X-X-X-I I-X-X-X-X-X-X-I I-X-X-X-X-X-X-I I-X-X-X-X-X-X-I +-------------+