求助(c++编程)

P1000 超级玛丽游戏

xyf778899 @ 2023-04-01 19:41:27

请教解法,谢谢。


by lyz97531 @ 2023-07-15 16:45:23

#include<bits/stdc++.h>
using namespace std;
int main()
{
    printf(
    "                ********\n"
    "               ************\n"
    "               ####....#.\n"
    "             #..###.....##....\n"
    "             ###.......######              ###            ###\n"
    "                ...........               #...#          #...#\n"
    "               ##*#######                 #.#.#          #.#.#\n"
    "            ####*******######             #.#.#          #.#.#\n"
    "           ...#***.****.*###....          #...#          #...#\n"
    "           ....**********##.....           ###            ###\n"
    "           ....****    *****....\n"
    "             ####        ####\n"
    "           ######        ######\n"
    "##############################################################\n"
    "#...#......#.##...#......#.##...#......#.##------------------#\n"
    "###########################################------------------#\n"
    "#..#....#....##..#....#....##..#....#....#####################\n"
    "##########################################    #----------#\n"
    "#.....#......##.....#......##.....#......#    #----------#\n"
    "##########################################    #----------#\n"
    "#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#\n"
    "##########################################    ############\n"
    );
    return 0;
}

by Eason625 @ 2023-07-31 11:39:01

#include<stdio.h>
int main() {
    printf(
    "                ********\n"
    "               ************\n"
    "               ####....#.\n"
    "             #..###.....##....\n"
    "             ###.......######              ###            ###\n"
    "                ...........               #...#          #...#\n"
    "               ##*#######                 #.#.#          #.#.#\n"
    "            ####*******######             #.#.#          #.#.#\n"
    "           ...#***.****.*###....          #...#          #...#\n"
    "           ....**********##.....           ###            ###\n"
    "           ....****    *****....\n"
    "             ####        ####\n"
    "           ######        ######\n"
    "##############################################################\n"
    "#...#......#.##...#......#.##...#......#.##------------------#\n"
    "###########################################------------------#\n"
    "#..#....#....##..#....#....##..#....#....#####################\n"
    "##########################################    #----------#\n"
    "#.....#......##.....#......##.....#......#    #----------#\n"
    "##########################################    #----------#\n"
    "#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#\n"
    "##########################################    ############\n"
    );
    return 0;
}

by qiaozifan @ 2023-08-30 16:22:38

最简单解法


#include <bits.shdc++.h>
using namespace std;
char x;
int a[10000]={32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,42,42,42,42,42,42,42,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,42,42,42,42,42,42,42,42,42,42,42,42,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,35,35,35,35,46,46,46,46,35,46,10,32,32,32,32,32,32,32,32,32,32,32,32,32,35,46,46,35,35,35,46,46,46,46,46,35,35,46,46,46,46,10,32,32,32,32,32,32,32,32,32,32,32,32,32,35,35,35,46,46,46,46,46,46,46,35,35,35,35,35,35,32,32,32,32,32,32,32,32,32,32,32,32,32,32,35,35,35,32,32,32,32,32,32,32,32,32,32,32,32,35,35,35,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,46,46,46,46,46,46,46,46,46,46,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,35,46,46,46,35,32,32,32,32,32,32,32,32,32,32,35,46,46,46,35,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,35,35,42,35,35,35,35,35,35,35,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,35,46,35,46,35,32,32,32,32,32,32,32,32,32,32,35,46,35,46,35,10,32,32,32,32,32,32,32,32,32,32,32,32,35,35,35,35,42,42,42,42,42,42,42,35,35,35,35,35,35,32,32,32,32,32,32,32,32,32,32,32,32,32,35,46,35,46,35,32,32,32,32,32,32,32,32,32,32,35,46,35,46,35,10,32,32,32,32,32,32,32,32,32,32,32,46,46,46,35,42,42,42,46,42,42,42,42,46,42,35,35,35,46,46,46,46,32,32,32,32,32,32,32,32,32,32,35,46,46,46,35,32,32,32,32,32,32,32,32,32,32,35,46,46,46,35,10,32,32,32,32,32,32,32,32,32,32,32,46,46,46,46,42,42,42,42,42,42,42,42,42,42,35,35,46,46,46,46,46,32,32,32,32,32,32,32,32,32,32,32,35,35,35,32,32,32,32,32,32,32,32,32,32,32,32,35,35,35,10,32,32,32,32,32,32,32,32,32,32,32,46,46,46,46,42,42,42,42,32,32,32,32,42,42,42,42,42,46,46,46,46,10,32,32,32,32,32,32,32,32,32,32,32,32,32,35,35,35,35,32,32,32,32,32,32,32,32,35,35,35,35,10,32,32,32,32,32,32,32,32,32,32,32,35,35,35,35,35,35,32,32,32,32,32,32,32,32,35,35,35,35,35,35,10,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,10,35,46,46,46,35,46,46,46,46,46,46,35,46,35,35,46,46,46,35,46,46,46,46,46,46,35,46,35,35,46,46,46,35,46,46,46,46,46,46,35,46,35,35,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,35,10,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,35,10,35,46,46,35,46,46,46,46,35,46,46,46,46,35,35,46,46,35,46,46,46,46,35,46,46,46,46,35,35,46,46,35,46,46,46,46,35,46,46,46,46,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,10,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,32,32,32,32,35,45,45,45,45,45,45,45,45,45,45,35,10,35,46,46,46,46,46,35,46,46,46,46,46,46,35,35,46,46,46,46,46,35,46,46,46,46,46,46,35,35,46,46,46,46,46,35,46,46,46,46,46,46,35,32,32,32,32,35,45,45,45,45,45,45,45,45,45,45,35,10,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,32,32,32,32,35,45,45,45,45,45,45,45,45,45,45,35,10,35,46,35,46,46,35,46,46,46,46,35,46,46,35,35,46,35,46,46,35,46,46,46,46,35,46,46,35,35,46,35,46,46,35,46,46,46,46,35,46,46,35,32,32,32,32,35,45,45,45,45,45,45,45,45,45,45,35,10,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,32,32,32,32,35,35,35,35,35,35,35,35,35,35,35,35,10};
int main()
{
    for(int i = 0;i <= 1148;i++)
    {
        cout<<(char)a[i]; 
    } 
    return 0;
}

by witherbogged @ 2023-10-31 20:26:41

#include<cstdio>
using namespace std;
int main() {
    printf("                ********\n");
    printf("               ************\n");
    printf("               ####....#.\n");
    printf("             #..###.....##....\n");
    printf("             ###.......######              ###            ###\n");
    printf("                ...........               #...#          #...#\n");
    printf("               ##*#######                 #.#.#          #.#.#\n");
    printf("            ####*******######             #.#.#          #.#.#\n");
    printf("           ...#***.****.*###....          #...#          #...#\n");
    printf("           ....**********##.....           ###            ###\n");
    printf("           ....****    *****....\n");
    printf("             ####        ####\n");
    printf("           ######        ######\n");
    printf("##############################################################\n");
    printf("#...#......#.##...#......#.##...#......#.##------------------#\n");
    printf("###########################################------------------#\n");
    printf("#..#....#....##..#....#....##..#....#....#####################\n");
    printf("##########################################    #----------#\n");
    printf("#.....#......##.....#......##.....#......#    #----------#\n");
    printf("##########################################    #----------#\n");
    printf("#.#..#....#..##.#..#....#..##.#..#....#..#    #----------#\n");
    printf("##########################################    ############\n");
    return 0;
}

上一页 |