QOJ.ac

QOJ

حد الوقت: 1.0 s حد الذاكرة: 256 MB مجموع النقاط: 100 قابلة للهجوم ✓

#15604. M

الإحصائيات

Busy Beaver 正在举办一场 MITIT 派对!

Busy Beaver 计划打印一条巨大的横幅。他的打印机非常复古:它在一个 $N \times N$ 的像素网格上进行打印(其中 $N$ 为奇数),使用 # 表示墨水,使用 . 表示空白。对于横幅上的第一个字母,他需要打印字母 M,如下图所示。

你的任务是准确地告诉打印机哪些像素需要涂上墨水。

形式上,字母 M 的定义如下:横幅的左边缘和右边缘是 M 的两条垂直“腿”,从最顶端一直延伸到最底端。从顶部的两个角开始,两条斜率分别为 $1$ 和 $-1$ 的笔画向内向下延伸(左右各一条),恰好在中间行相交。由于 $n$ 是奇数,因此存在唯一的中心列和唯一的中间行,斜笔画在此处相交。在相交点下方,只有两条外侧的“腿”继续延伸到最底端。

输入格式

第一行包含一个整数 $T$ ($1 \le T \le 50$) — 测试用例的数量。

每个测试用例的唯一一行包含一个奇整数 $N$ ($5 \le N < 50$,$N$ 为奇数) — Busy Beaver 的网格边长。

输出格式

对于每个测试用例,输出 $N$ 行,每行包含 $N$ 个字符 #.(不含空格)— 题面中所描述的字母 M。

请勿在测试用例之间输出空行。

样例

输入样例 1

3
5
7
9

输出样例 1

#...#
##.##
#.#.#
#...#
#...#
#.....#
##...##
#.#.#.#
#..#..#
#.....#
#.....#
#.....#
#.......#
##.....##
#.#...#.#
#..#.#..#
#...#...#
#.......#
#.......#
#.......#
#.......#

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.