zoukankan      html  css  js  c++  java
  • P1000 超级玛丽游戏

    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 }
  • 相关阅读:
    【luogu P1040 加分二叉树】 题解
    【luogu P4711 「化学」相对分子质量】 题解
    【luogu P2319 [HNOI2006]超级英雄】 题解
    【luogu P1640 [SCOI2010]连续攻击游戏】 题解
    【luogu P3369 普通平衡树(Treap/SBT)】 模板 Splay
    【luogu P2234 [HNOI2002]营业额统计】 题解
    【luogu P1494 [国家集训队]小Z的袜子】 题解
    【luogu P3901 数列找不同】 题解
    【luogu P3807 卢卡斯定理】 模板
    JAVA IO 体系
  • 原文地址:https://www.cnblogs.com/NirobertEinteson/p/12005549.html
Copyright © 2011-2022 走看看