#D. 曼哈顿圆圈

    Type: Default 1000ms 256MiB

曼哈顿圆圈

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

给定一个奇数 nn,假设 nn 等于 2×k+12\times k+1

请输出一个 n×nn\times n 的字符画。所有到中心点的曼哈顿距离为 kk 的位置都是 *,其他位置都是 .

  • 曼哈顿距离:第 xx 行第 yy 列到第 aa 行第 bb 列的曼哈顿距离为 xa+yb|x-a|+|y-b|
  • x|x|:表示 xx 的绝对值,x0x\ge 0 时绝对值就是 xx,否则绝对值是 x-x

输入格式

第一行一个整数 nn

输出格式

nnnn 列的字符画。

3
.*.
*.*
.*.
5
..*..
.*.*.
*...*
.*.*.
..*..

数据规模与约定

对于 100%100\% 的数据,3n213 \le n \le 21

C++校统测二

Not Attended
Status
Done
Rule
Ledo
Problem
5
Start at
2024-12-20 14:30
End at
2024-12-28 22:30
Duration
200 hour(s)
Host
Partic.
12