跳到正文

题解

题解:P1000 超级玛丽游戏

chenyuan3约 3 分钟
原文
文章信息与版本

文章信息

发布
2025年5月10日
收录
2025年12月12日
更新
2026年11月16日
篇幅
约 3 分钟
题目
P1000

版本

  1. v1当前

介绍一种使用 C++11 特性输出多行字符串的方法:原始字符串字面量。

cppref 文档

原始字符串字面量以 R"( 开头,以 )" 结尾,中间可以添加换行。代码:

C++
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
    cout << R"(                ********
               ************
               ####....#.
             #..###.....##....
             ###.......######              ###            ###
                ...........               #...#          #...#
               ##*#######                 #.#.#          #.#.#
            ####*******######             #.#.#          #.#.#
           ...#***.****.*###....          #...#          #...#
           ....**********##.....           ###            ###
           ....****    *****....
             ####        ####
           ######        ######
##############################################################
#...#......#.##...#......#.##...#......#.##------------------#
###########################################------------------#
#..#....#....##..#....#....##..#....#....#####################
##########################################    #----------#
#.....#......##.....#......##.....#......#    #----------#
##########################################    #----------#
#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#
##########################################    ############)";
}
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
 	// ll t; cin >> t; while (t--)
	solve();
	return 0;
}
原文