smart_ @ 2023-06-08 22:48:53
玛丽游戏这么ex吗? 大佬发串代码呗!超级玛丽
by yushanshui @ 2023-06-22 21:55:32
#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;
}
代码虽然就7行但非常长长长长长长长长长。
by Kuangxirui @ 2023-06-25 13:03:36
#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;
}//printf可以多行输出(不用一行一行打啦!)
by IOI_AK_TLR @ 2023-06-25 18:42:35
@chuxm smart
by 54_Ikun @ 2023-07-01 22:57:26
#include<iostream>
#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 qwiwiiwjjdks @ 2023-07-02 14:28:54
#include <bits/stdc++.h>
using namespace std;
int mp[100][100];
int last[100];
int n = 22, m = 62;
void draw(int x1, int y1, int x2, int y2, char ch = '#'){
for(int i = x1; i <= x2; i++)
for(int j = y1; j <= y2; j++)
mp[i][j] = ch;
}
void draw(int x1, int y1, char ch = '#'){
draw(x1, y1, x1, y1, ch);
}
void drawland(int x, int y){
draw(x, y, x+8, y+13);
for(int i = x+1; i < x+8; i+=2)
draw(i, y+1, i, y+12, '.');
draw(x+1, y+4); draw(x+1, y+11);
draw(x+3, y+3); draw(x+3, y+8);
draw(x+5, y+6); draw(x+7, y+2);
draw(x+7, y+5); draw(x+7, y+10);
}
void drawisland(int x, int y){
draw(x, y, x+3, y+19);
draw(x+1, y+1, x+2, y+18, '-');
draw(x+4, y+4, x+8, y+15);
draw(x+4, y+5, x+7, y+14, '-');
}
void drawcoin(int x, int y){
draw(x, y, x+5, y+4);
draw(x+1, y+1, x+4, y+3, '.');
draw(x+2, y+2, x+3, y+2);
draw(x, y, ' '); draw(x+5, y, ' ');
draw(x, y+4, ' '); draw(x+5, y+4, ' ');
}
void drawman(int x, int y){
draw(x, y+5, x, y+12, '*'); x++;
draw(x, y+4, x, y+15, '*'); x++;
draw(x, y+4, x, y+7); draw(x, y+8, x, y+13, '.'); draw(x, y+12); x++;
draw(x, y+2, x, y+14); draw(x, y+3, x, y+4, '.');
draw(x, y+8, x, y+12, '.'); draw(x, y+15, x, y+18, '.'); x++;
draw(x, y+2, x, y+17); draw(x, y+5, x, y+11, '.'); x++;
draw(x, y+5, x, y+15, '.'); x++;
draw(x, y+4, x, y+13); draw(x, y+6, '*'); x++;
draw(x, y+1, x, y+17); draw(x, y+5, x, y+11, '*'); x++;
draw(x, y, x+2, y+20, '.'); draw(x, y+4, x+2, y+16, '*');
draw(x, y+3); draw(x, y+14, x+1, y+16); draw(x+1, y+16, '.');
draw(x+2, y+8, x+2, y+11, ' '); draw(x, y+7, '.'); draw(x, y+12, '.');
draw(x+3, y, x+4, y+19); draw(x+3, y+6, x+4, y+13, ' ');
draw(x+3, y, x+3, y+1, ' '); draw(x+3, y+18, x+3, y+19, ' ');
}
void printscreen(){
for(int i = 1; i <= n; i++){
last[i] = m;
while(mp[i][last[i]] == ' ')
last[i]--;
}
for(int i = 1; i <= n; i++,puts(""))
for(int j = 1; j <= last[i]; j++)
putchar(mp[i][j]);
}
int main(){
for(int i = 1; i <= n; i++)
for(int j = 1; j <= m; j++)
mp[i][j] = ' ';
drawman(1, 12);
drawland(14, 1); drawland(14, 15); drawland(14, 29);
drawisland(14, 43);
drawcoin(5, 43); drawcoin(5, 58);
printscreen();
return 0;
}
by CznTree @ 2023-07-04 08:34:17
@smart_ A了黑题不会超级玛丽 怎么做到的
by I_AM_AC_KING @ 2023-07-07 09:25:23
这一题“超级玛丽游戏”只是一个简单的输出,cout和endl即可解决。
by Harry_W @ 2023-07-09 13:46:34
最简单易懂的就是这串超级废手的代码:
#include<iostream>
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<<"########################################## ############"<<endl;
return 0;
}
by Steven135 @ 2023-07-09 20:08:08
#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 << "########################################## ############" << endl;
return 0;
}
by panwangxi @ 2023-07-14 11:29:08
werewolf、