码迷,mamicode.com
首页 > 其他好文 > 详细

P1000 超级玛丽游戏

时间:2019-12-08 14:06:51      阅读:93      评论:0      收藏:0      [点我收藏+]

标签:++   data   style   输入输出   一个   描述   center   超级玛丽   输入   

P1000 超级玛丽游戏

题目描述
超级玛丽是一个非常经典的游戏。请你用字符画的形式输出超级玛丽中的一个场景。

********
************
####....#.
#..###.....##....
###.......###### ### ###
........... #...# #...#
##*####### #.#.# #.#.#
####*******###### #.#.# #.#.#
...#***.****.*###.... #...# #...#
....**********##..... ### ###
....**** *****....
#### ####
###### ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
########################################## #----------#
#.....#......##.....#......##.....#......# #----------#
########################################## #----------#
#.#..#....#..##.#..#....#..##.#..#....#..# #----------#
########################################## ############
输入格式

输出格式
如描述

输入输出样例

 

 1 解法:
 2 
 3 #include<bits/stdc++.h>
 4 using namespace std;
 5 
 6 int main()
 7 {
 8     /*思路:
 9         1:将打印的图形数据存到字符串数组里面
10         2:遍历按行打印
11     */
12     string data[]= {"                ********","               ************","               ####....#.","             #..###.....##....","             ###.......######              ###            ###","                ...........               #...#          #...#","               ##*#######                 #.#.#          #.#.#","            ####*******######             #.#.#          #.#.#","           ...#***.****.*###....          #...#          #...#","           ....**********##.....           ###            ###","           ....****    *****....","             ####        ####","           ######        ######","##############################################################","#...#......#.##...#......#.##...#......#.##------------------#","###########################################------------------#","#..#....#....##..#....#....##..#....#....#####################","##########################################    #----------#","#.....#......##.....#......##.....#......#    #----------#","##########################################    #----------#","#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#","##########################################    ############"};
13     for(auto str:data){
14         cout<<str<<endl;
15     }
16     return 0;
17 }

 

P1000 超级玛丽游戏

标签:++   data   style   输入输出   一个   描述   center   超级玛丽   输入   

原文地址:https://www.cnblogs.com/NirobertEinteson/p/12005549.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!