当前位置:网站首页>P1058 [NOIP2008 普及组] 立体图
P1058 [NOIP2008 普及组] 立体图
2022-08-06 03:36:00 【小天狼星_布莱克】
题目描述
小渊是个聪明的孩子,他经常会给周围的小朋友们将写自己认为有趣的内容。最近,他准备给小朋友们讲解立体图,请你帮他画出立体图。
小渊有一块面积为m \times nm×n的矩形区域,上面有m \times nm×n个边长为11的格子,每个格子上堆了一些同样大小的积木(积木的长宽高都是11),小渊想请你打印出这些格子的立体图。我们定义每个积木为如下格式,并且不会做任何翻转旋转,只会严格以这一种形式摆放:

每个顶点用11个加号’++’表示,长用33个”-−”表示,宽用11个”/”,高用两个”|”表示。字符’++’,”-−”,”/”,”|”的ASCIIASCII码分别为4343,4545,4747,124124。字符’.’(ASCIIASCII码4646)需要作为背景输出,即立体图里的空白部分需要用’.’来代替。立体图的画法如下面的规则:
若两块积木左右相邻,图示为:

若两块积木上下相邻,图示为:

若两块积木前后相邻,图示为:

立体图中,定义位于第(m,1(m,1)的格子(即第mm行第11列的格子)上面自底向上的第一块积木(即最下面的一块积木)的左下角顶点为整张图最左下角的点。
输入格式
第一行有用空格隔开的22个整数mm和nn,表示有m \times nm×n个格子(1 \le m,n \le 50)(1≤m,n≤50)。
接下来的mm行,是一个m \times nm×n的矩阵,每行有nn个用空格隔开的整数,其中第ii行第jj列上的整数表示第ii行第jj列的个子上摞有多少个积木(1 \le1≤每个格子上的积木数\le 100≤100)。
输出格式
输出包含题目要求的立体图,是一个KK行LL列的字符串矩阵,其中KK和LL表示最少需要KK行LL列才能按规定输出立体图。
输入输出样例
输入 #1复制
3 4 2 2 1 2 2 2 1 1 3 2 1 2
输出 #1复制
......+---+---+...+---+ ..+---+ / /|../ /| ./ /|-+---+ |.+---+ | +---+ |/ /| +-| | + | | +---+ |/+---+ |/| | |/ /| +/ /|-+ | +---+---+ |/+---+ |/| + | | | +-| | + |/. | | |/ | |/| +.. +---+---+---+---+ |/... | | | | | +.... | | | | |/..... +---+---+---+---+......
说明/提示
NOIP2008普及组第四题
边栏推荐
- What is an inner class?
- Several common misunderstandings of enterprises and webmasters renting servers in 2022
- Django reports an error ModuleNotFoundError: No module named 'mysqlclient'
- 暑假集训week3-DP
- Do I need to exclude old campaigns for new country campaigns?
- [Untitled] Directory Test
- A complete solution for serial port data reception in QT
- Literature Reading---Analysis of Genome Haplotypes and Genome Stability and Creeping of Common Bermudagrass Yangjiang
- Entering the pit of machine learning: 2. Supervised learning
- Crypto Bear Market Offers M&A Opportunity Ambitious or Savior?The only truth is that interests come first
猜你喜欢

6. -- -- -- -- -- test automation of software testing unittest framework
![[wpf] Detailed explanation of three callbacks for dependency properties](/img/67/6198ff0626cbfd93611345e120cd1a.png)
[wpf] Detailed explanation of three callbacks for dependency properties

Crypto Bear Market Offers M&A Opportunity Ambitious or Savior?The only truth is that interests come first

ctf (finalrec)

2022 Alibaba Cloud server configuration selection strategy

如果一个国家市场效果特别好,我们如何加大这个国家的投放比例。

Literature Reading---Analysis of Genome Haplotypes and Genome Stability and Creeping of Common Bermudagrass Yangjiang

Use BeanUtils with caution, the performance really stretches!

Internet protocol overview

ALV details are reorganized2022.8.5
随机推荐
Entering the pit of machine learning: 2. Supervised learning
hibernate+durid参数配置错误导致的问题SQLServerException: 服务器无法继续执行该事务。说明: 10400000001
The Google account was suspended for three months and reactivated, and the Google account was suspended for three months and reactivated. Is the conversion goal valid?
Summer training week3-DP
2022年京东新百货七夕礼遇季活动有什么亮点?
如果一个国家市场效果特别好,我们如何加大这个国家的投放比例。
leetcode 15. Sum of three numbers
FluentValidation
电赛电源类题型之问
xctf攻防世界 Web高手进阶区 command_execution
89.(cesium之家)cesium聚合图(自定义图片)
Preprocessing (in-depth understanding of C language)
xctf Attack and Defense World Web Master Advanced Zone upload1
2018HBCPC Partial Solutions
Deep Learning Course2 Week 2 Hyperparameter tuning, Batch Normalization, Programming Frameworks exercises
浦发银行长沙分行党委书记、行长王起,华融湘江银行行长蒋俊文一行莅临麒麟信安调研考察
数字孪生实际应用案例-智慧港口篇
AC8015 Notes
What is an Egg. The js, it have what features, installation of an Egg framework, definition of routing, what's Controller is the Controller, CORS configuration, the json configuration, a get request,
Django用orm修改mysql数据库运行出现错误