0
点赞
收藏
分享

微信扫一扫

洛谷P1000题解(C++)

kolibreath 2022-02-09 阅读 67

首先先上题目传送门

然后题目拿来吧你

题目描述

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

                ********
               ************
               ####....#.
             #..###.....##....
             ###.......######              ###            ###
                ...........               #...#          #...#
               ##*#######                 #.#.#          #.#.#
            ####*******######             #.#.#          #.#.#
           ...#***.****.*###....          #...#          #...#
           ....**********##.....           ###            ###
           ....****    *****....
             ####        ####
           ######        ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
##########################################    #----------#
#.....#......##.....#......##.....#......#    #----------#
##########################################    #----------#
#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#
##########################################    ############

输入格式

输出格式

如描述

输入输出样例

思路:

本题是洛谷的试机题目,可以帮助了解洛谷的使用。

作为一题模拟,加一点点字符串的题,并且输出贼复杂,所以应该使用复制粘贴(当作没看到)

上代码:

#include <bits/stdc++.h>

using namespace std;

int main() {
	cout << "                ********" << endl;      
	cout << "               ************" << endl;   
	cout << "               ####....#." << endl;     
	cout << "             #..###.....##...." << endl;
	cout << "             ###.......######              ###            ###" << endl;
	cout << "                ...........               #...#          #...#" << endl;
	cout << "               ##*#######                 #.#.#          #.#.#" << endl;
	cout << "            ####*******######             #.#.#          #.#.#" << endl;
	cout << "           ...#***.****.*###....          #...#          #...#" << endl;
	cout << "           ....**********##.....           ###            ###" << endl;
	cout << "           ....****    *****...." << endl;
	cout << "             ####        ####" << endl;
	cout << "           ######        ######" << endl;
	cout << "##############################################################" << endl;
	cout << "#...#......#.##...#......#.##...#......#.##------------------#" << endl;
	cout << "###########################################------------------#" << endl;
	cout << "#..#....#....##..#....#....##..#....#....#####################" << endl;
	cout << "##########################################    #----------#" << endl;
	cout << "#.....#......##.....#......##.....#......#    #----------#" << endl;
	cout << "##########################################    #----------#" << endl;
	cout << "#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#" << endl;
	cout << "##########################################    ############";
	return 0;
}

这题用printf也行,但是我爱cout。

来自蒟蒻的呻吟:

这题交了4遍才过,真的快瞎了,救命!!!

(说下哈,我发题解不按题号,根据洛谷官方题单,但其实也不按里面的顺序

举报

相关推荐

洛谷P1000 超级玛丽游戏

C++洛谷题解(28)——P5717

C++洛谷题解(29)——P4414

C++洛谷题解(7)

洛谷P1002题解

洛谷P6974题解

洛谷P1598题解

0 条评论