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 }