1. 程式人生 > 實用技巧 >10:超級瑪麗遊戲

10:超級瑪麗遊戲

OpenJudge-1.1程式設計基礎之輸入輸出-10:超級瑪麗遊戲
總Time Limit: 1000ms     Memory Limit: 65536kB

Description

超級瑪麗是一個非常經典的遊戲。請你用字元畫的形式輸出超級瑪麗中的一個場景。

Input

Output

如樣例所示

Sample Input

Sample Output

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

Hint

必須嚴格按樣例輸出,每行的行尾不能有空格。

C++ Code

#include <iostream>
#include <iomanip>
using namespace std;
int main() {
cout<<setw(17)<<"*"<<"*******"<<endl;
cout<<setw(16)<<"*"<<"***********"<<endl;
cout<<setw(16)<<"#"<<"###....#."<<endl;
cout<<setw(14)<<"#"<<"..###.....##...."<<endl;
cout<<setw(14)<<"#"<<"##.......######"<<setw(15)<<"#"<<"##"<<setw(18)<<"#"<<"##"<<setw(12)<<"#"<<"##"<<setw(12)<<"#"<<"##"<<endl;
cout<<setw(17)<<"."<<".........."<<setw(16)<<"#"<<"...#"<<setw(16)<<"#"<<"...#"<<setw(10)<<"#"<<"...#"<<setw(10)<<"#"<<"...#"<<endl;
cout<<setw(16)<<"#"<<"#*#######"<<setw(18)<<"#"<<".#.#"<<setw(16)<<"#"<<".#.#"<<setw(10)<<"#"<<".#.#"<<setw(10)<<"#"<<".#.#"<<endl;
cout<<setw(13)<<"#"<<"###*******######"<<setw(14)<<"#"<<".#.#"<<setw(16)<<"#"<<".#.#"<<setw(10)<<"#"<<".#.#"<<setw(10)<<"#"<<".#.#"<<endl;
cout<<setw(12)<<"."<<"..#***.****.*###...."<<setw(11)<<"#"<<"...#"<<setw(16)<<"#"<<"...#"<<setw(10)<<"#"<<"...#"<<setw(10)<<"#"<<"...#"<<endl;
cout<<setw(12)<<"."<<"...**********##....."<<setw(12)<<"#"<<"##"<<setw(18)<<"#"<<"##"<<setw(12)<<"#"<<"##"<<setw(12)<<"#"<<"##"<<endl;
cout<<setw(12)<<"."<<"...****"<<setw(5)<<"*"<<"****...."<<endl;
cout<<setw(14)<<"#"<<"###"<<setw(9)<<"#"<<"###"<<endl;
cout<<setw(12)<<"#"<<"#####"<<setw(9)<<"#"<<"#####"<<endl;
cout<<"##############################################################"<<setw(15)<<"#"<<"#################################"<<endl;
cout<<"#...#......#.##...#......#.##...#......#.##------------------#"<<setw(15)<<"#"<<"...#......#.##------------------#"<<endl;
cout<<"###########################################------------------#"<<setw(15)<<"#"<<"##############------------------#"<<endl;
cout<<"#..#....#....##..#....#....##..#....#....#####################"<<setw(15)<<"#"<<"..#....#....#####################"<<endl;
cout<<"##########################################"<<setw(5)<<"#"<<"----------#"<<setw(19)<<"#"<<"#############"<<setw(5)<<"#"<<"----------#"<<endl;
cout<<"#.....#......##.....#......##.....#......#"<<setw(5)<<"#"<<"----------#"<<setw(19)<<"#"<<".....#......#"<<setw(5)<<"#"<<"----------#"<<endl;
cout<<"##########################################"<<setw(5)<<"#"<<"----------#"<<setw(19)<<"#"<<"#############"<<setw(5)<<"#"<<"----------#"<<endl;
cout<<"#.#..#....#..##.#..#....#..##.#..#....#..#"<<setw(5)<<"#"<<"----------#"<<setw(19)<<"#"<<".#..#....#..#"<<setw(5)<<"#"<<"----------#"<<endl;
cout<<"##########################################"<<setw(5)<<"#"<<"###########"<<setw(19)<<"#"<<"#############"<<setw(5)<<"#"<<"###########"<<endl;
return 0;
}