• 个人简介

    摸鱼人的小仓库 大虫子 小恐龙 数字组 死铁 4399 迷宫 百度游戏 名字竞技场 ev.io 枪战游戏 飞机 枪战 电子木鱼 冲浪

           ┏┓   ┏┓
         ┏┛┻━━━┛┻┓
         ┃       ┃
         ┃   ━   ┃
         ┃ ┳┛ ┗┳ ┃
         ┃       ┃
         ┃   ┻   ┃
         ┃       ┃
         ┗━┓   ┏━┛Codes are far away from bugs with the animal protecting
             ┃   ┃    神兽保佑,代码无bug
             ┃   ┃
             ┃   ┗━━━┓
             ┃      ┣┓
             ┃     ┏┛
             ┗┓┓┏━┳┓┏┛            orz orz orz orz orz
               ┃┫┫ ┃┫┫			   orz orz orz orz orz
               ┗┻┛ ┗┻┛     ○| ̄|_  orz orz orz orz orz
    

    C++小游戏(五子棋)

    #include <iostream>
    using namespace std;
    int b[20][20];
    int n;
    int m;
    void qipan()
    {
    system("cls");
    int k = 1;
    for (int k = 0;k < n;++k)
    {
    for (int j = 0;j < m;++j)
    {
    cout << " ---- ";
    }
    cout << endl;
    for (int i = 0;i < n;++i)
    {
    for (int j = 0;j < m;++j)
    {
    if (b[i][j] < 10 && b[i][j] >= 0) cout << "| " << 0 << b[i][j] << " |";
    else if (b[i][j] == -1) cout << "| " << "█" << " |";
    else if (b[i][j] == -2) cout << "|" << " ○ " << "|";
    else cout << "| " << b[i][j] << " |";
    
    k++;
    }
    
    
    cout << endl;
    for (int j = 0;j < m;++j)
    {
    cout << " ---- ";
    }
    cout << endl;
    }
    
    }
    
    }
    void success()
    {
    long time;
    for (;;)
    {
    system("color a");
    for (time = 0; time < 99999999; time++);
    system("color b");
    for (time = 0; time < 99999999; time++);
    system("color c");
    for (time = 0; time < 99999999; time++);
    system("color d");
    for (time = 0; time < 99999999; time++);
    system("color e");
    for (time = 0; time < 99999999; time++);
    system("color f");
    for (time = 0; time < 99999999; time++);
    system("color 0");
    for (time = 0; time < 99999999; time++);
    system("color 1");
    for (time = 0; time < 99999999; time++);
    system("color 2");
    for (time = 0; time < 99999999; time++);
    system("color 3");
    for (time = 0; time < 99999999; time++);
    system("color 4");
    for (time = 0; time < 99999999; time++);
    system("color 5");
    for (time = 0; time < 99999999; time++);
    system("color 6");
    for (time = 0; time < 99999999; time++);
    system("color 7");
    for (time = 0; time < 99999999; time++);
    system("color 8");
    for (time = 0; time < 99999999; time++);
    system("color 9");
    }
    }
    int main()
    {
    cout << "请选择你们想要的棋盘大小(棋盘的面积请不要大于100)" << endl;
    cout << "棋盘的长:(推荐长度为10)" << endl;
    cin >> m;
    cout << "棋盘的宽:(推荐长度为10)" << endl;
    cin >> n;
    for (int i = 0;i < n;++i)
    {
    for (int j = 0;j < m;++j)
    {
    b[i][j] = i * m + j;
    }
    }
    qipan();
    while (1)
    {
    int x;
    cout << "请玩家一输入:" << endl;
    cin >> x;
    if (x == 648)
    {
    cout << "玩家一使用系统外挂" << endl;
    cout << "游戏结束" << endl;
    cout << "玩家一获胜" << endl;
    success();
    return 0;
    }
    for (int i = 0;i < n;++i)
    {
    for (int j = 0;j < m;++j)
    {
    if (b[i][j] == x) b[i][j] = -1;
    }
    }
    for (int i = 0;i < n;++i)
    {
    for (int j = 0;j < m - 4;++j)
    {
    if ((b[i][j] == -1 && b[i][j + 1] == -1 && b[i][j + 2] == -1 && b[i][j + 3] == -1 && b[i][j + 4] == -1)
    || (b[i][j] == -1 && b[i + 1][j] == -1 && b[i + 2][j] == -1 && b[i + 3][j] == -1 && b[i + 4][j] == -1)
    || (b[i][j] == -1 && b[i + 1][j + 1] == -1 && b[i + 2][j + 2] == -1 && b[i + 3][j + 3] == -1 && b[i + 4][j + 4] == -1))
    {
    cout << "游戏结束" << endl;
    cout << "玩家一获胜" << endl;
    success();
    return 0;
    }
    else if (i >= 4 && (b[i][j] == -1 && b[i - 1][j + 1] == -1 && b[i - 2][j + 2] == -1 && b[i - 3][j + 3] == -1 && b[i - 4][j + 4] == -1))
    {
    cout << "游戏结束" << endl;
    cout << "玩家一获胜" << endl;
    success();
    return 0;
    }
    }
    }
    qipan();
    cout << "请玩家二输入:" << endl;
    cin >> x;
    if (x == 648)
    {
    cout << "玩家二使用系统外挂" << endl;
    cout << "游戏结束" << endl;
    cout << "玩家二获胜" << endl;
    success();
    return 0;
    }
    for (int i = 0;i < n;++i)
    {
    for (int j = 0;j < m;++j)
    {
    if (b[i][j] == x) b[i][j] = -2;
    }
    }
    qipan();
    for (int i = 0;i < n;++i)
    {
    for (int j = 0;j < m - 4;++j)
    {
    if ((b[i][j] == -2 && b[i][j + 1] == -2 && b[i][j + 2] == -2 && b[i][j + 3] == -2 && b[i][j + 4] == -2)
    || (b[i][j] == -2 && b[i + 1][j] == -2 && b[i + 2][j] == -2 && b[i + 3][j] == -2 && b[i + 4][j] == -2)
    || (b[i][j] == -2 && b[i + 1][j + 1] == -2 && b[i + 2][j + 2] == -2 && b[i + 3][j + 3] == -2 && b[i + 4][j + 4] == -2))
    {
    cout << "游戏结束" << endl;
    cout << "玩家二获胜" << endl;
    success();
    return 0;
    }
    else if (i >= 4 && (b[i][j] == -2 && b[i - 1][j + 1] == -2 && b[i - 2][j + 2] == -2 && b[i - 3][j + 3] == -2 && b[i - 4][j + 4] == -2))
    {
    cout << "游戏结束" << endl;
    cout << "玩家二获胜" << endl;
    success();
    return 0;
    }
    }
    }
    
    }
    
    }
    
    

    C++小游戏(简易枪战)

    #include<iostream>
    #include<cstdio>
    #include<windows.h>
    #include<conio.h>
    #pragma warning(disable : 4996)
    using namespace std;
    int SIZ = 20;
    HANDLE hout = GetStdHandle(STD_OUTPUT_HANDLE);
    COORD coord;
    
    HANDLE hCon;
    enum Color { DARKBLUE = 1, DARKGREEN, DARKTEAL, DARKRED, DARKPINK, DARKYELLOW, GRAY, DARKGRAY, BLUE, GREEN, TEAL, RED, PINK, YELLOW, WHITE };
    void SetColor(Color c) {
    if (hCon == NULL)
    hCon = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleTextAttribute(hCon, c);
    }
    
    SYSTEMTIME sys;
    
    //sys.wYear,sys.wMonth,sys.wDay,sys.wHour,sys.wMinute, sys.wSecond,sys.wMilliseconds,sys.wDayOfWeek
    struct PLAYER {
    int x, y;
    int hp;
    int gun;
    int direct;
    } p1, p2;
    int map[1005][1005];
    
    int abs(int x) {
    if (x < 0) return -x;
    return x;
    }
    
    void locate(int x, int y) {
    coord.X = y - 1;
    coord.Y = x - 1;
    SetConsoleCursorPosition(hout, coord);
    }
    
    void print_map() {
    locate(1, 1);
    SetColor(GRAY);
    for (int i = 1; i <= SIZ; i++) cout << "■";
    locate(SIZ, 1);
    for (int i = 1; i <= SIZ; i++) cout << "■";
    for (int i = 2; i < SIZ; i++) {
    locate(i, 1);
    cout << "■";
    locate(i, SIZ * 2 - 1);
    cout << "■";
    }
    locate(SIZ + 1, 1);
    SetColor(WHITE);
    }
    
    void create_tree(int x, int y) {
    map[x][y] = map[x + 1][y] = map[x - 1][y] = map[x][y + 1] = map[x][y - 1] = 2;
    }
    
    void use_map(int x) {
    if (x == 1) {
    SIZ = 20;
    SetColor(DARKGREEN);
    map[16][6] = map[15][6] = map[17][6] = map[16][7] = map[16][5] = map[14][13] = map[13][12] = map[13][13] = 2;
    for (int i = 2; i < SIZ; i++) {
    for (int j = 2; j < SIZ; j++) {
    if (map[i][j] == 2) {
    locate(i, j * 2 - 1);
    cout << "■";
    }
    }
    }
    SetColor(GRAY);
    for (int i = 5; i <= 15; i++) {
    map[i][i] = 1;
    locate(i, i * 2 - 1);
    cout << "■";
    }
    SetColor(WHITE);
    }
    else if (x == 2) {
    SIZ = 30;
    SetColor(GRAY);
    for (int i = 4; i <= 26; i++) {
    if (i == 13 || i == 14 || i == 15) continue;
    map[i][4] = map[4][i] = map[26][i] = map[i][26] = 1;
    }
    for (int i = 1; i <= SIZ; i++) {
    for (int j = 1; j <= SIZ; j++) {
    if (map[i][j] == 1) {
    locate(i, j * 2 - 1);
    cout << "■";
    }
    }
    }
    SetColor(DARKGREEN);
    for (int i = 10; i <= 20; i++) {
    if (i == 13 || i == 17) continue;
    map[i][10] = map[10][i] = map[20][i] = map[i][20] = 2;
    }
    create_tree(5, 5);
    create_tree(18, 18);
    for (int i = 1; i <= SIZ; i++) {
    for (int j = 1; j <= SIZ; j++) {
    if (map[i][j] == 2) {
    locate(i, j * 2 - 1);
    cout << "■";
    }
    }
    }
    SetColor(WHITE);
    }
    }
    void cleanbody(int x, int y);
    void putbody(int x, int y, int z);
    
    void player_init() {
    p1.hp = p2.hp = 300;
    p1.gun = p2.gun = 1;
    p1.direct = 4;
    p2.direct = 2;
    p1.x = 2;
    p1.y = 2;
    p2.x = SIZ - 1;
    p2.y = SIZ - 1;
    putbody(p1.x, p1.y, 1);
    putbody(p2.x, p2.y, 2);
    }
    
    void mapinit() {
    for (int i = 1; i <= SIZ; i++) {
    map[i][1] = map[1][i] = map[SIZ][i] = map[i][SIZ] = 1;
    }
    }
    
    void init() {
    printf("Use Which Map?\n");
    int x;
    cin >> x;
    system("cls");
    use_map(x);
    mapinit();
    print_map();
    player_init();
    }
    
    void putbody(int x, int y, int z) {
    if (z == 1) SetColor(BLUE);
    else if (z == 2) SetColor(RED);
    locate(x, y * 2 - 1);
    cout << "■";
    SetColor(WHITE);
    }
    void cleanbody(int x, int y) {
    locate(x, y * 2 - 1);
    cout << " ";
    }
    /*
    LIST
    direct:
    w 1
    a 2
    s 3
    d 4
    gun:
    usp 1
    mimigun 2
    awp 3
    block:
    void 0
    stone 1
    tree 2
    player 3
    clip 4
    */
    bool judge(int x, int y) {
    if (map[x][y] == 1) return false;
    if (map[x][y] == 2) return false;
    if (map[x][y] == 3) return false;
    return true;
    }
    
    bool judge_gun(int x, int y, int a)
    {
    if (map[x][y] == 1) return 0;
    if (map[x][y] == 2) return 0;
    if (map[x][y] == 3) {
    if (p1.x == x && p1.y == y)
    {
    if (a == 1)p1.hp -= 50;
    else if (a == 2)p1.hp -= 100;
    else if (a == 3)p1.hp -= 300;
    }
    else
    {
    if (a == 1)p2.hp -= 50;
    else if (a == 2)p2.hp -= 100;
    else if (a == 3)p2.hp -= 300;
    }
    return 0;
    }
    return 1;
    }
    
    int cnt;
    struct Clip {
    int x, y;
    int derect;
    int force;
    int start;
    bool flag;
    } clip[1000000];
    void create_clip(int y, int x, int a, int b,int g) {
    int X, Y;
    if (y == 1) {
    if (!judge_gun(a - 1, b,g)) return;
    X = a - 1;
    Y = b;
    }
    else if (y == 2) {
    if (!judge_gun(a, b - 1,g)) return;
    X = a;
    Y = b - 1;
    }
    else if (y == 3) {
    if (!judge_gun(a + 1, b,g)) return;
    X = a + 1;
    Y = b;
    }
    else if (y == 4) {
    if (!judge_gun(a, b + 1,g)) return;
    X = a;
    Y = b + 1;
    }
    cnt++;
    GetLocalTime(&sys);
    clip[cnt].start = sys.wMilliseconds + sys.wSecond * 60 + sys.wHour * 3600;
    clip[cnt].x = X;
    clip[cnt].y = Y;
    if (x == 1) {
    clip[cnt].derect = p1.direct;
    }
    else if (x == 2) {
    clip[cnt].derect = p2.direct;
    }
    }
    
    void shoot(int x,int g) {
    if (x == 1) {
    create_clip(p1.direct, 1, p1.x, p1.y,g);
    }
    else if (x == 2) {
    create_clip(p2.direct, 2, p2.x, p2.y,g);
    }
    }
    
    void clean_clip(int x, int y) {
    locate(x, y * 2 - 1);
    cout << "  ";
    locate(1, 1);
    }
    
    void print_clip(int x, int y, int i) {
    if (clip[i].flag) {
    clean_clip(x, y);
    return;
    }
    locate(x, y * 2 - 1);
    SetColor(YELLOW);
    cout << "''";
    locate(1, 1);
    }
    
    void clipmove(int g) {
    GetLocalTime(&sys);
    int t = sys.wMilliseconds + sys.wSecond * 60 + sys.wHour * 3600;
    for (int i = 1; i <= cnt; i++) {
    if (clip[i].flag) continue;
    if (abs(clip[i].start - t) > 50) {
    clip[i].start = t;
    int x = clip[i].x;
    int y = clip[i].y;
    if (clip[i].derect == 1) {
    if (!judge_gun(clip[i].x - 1, clip[i].y,g)) {
    clip[i].flag = 1;
    clean_clip(x, y);
    continue;
    }
    clean_clip(clip[i].x, clip[i].y);
    clip[i].x--;
    print_clip(clip[i].x, clip[i].y, i);
    }
    else if (clip[i].derect == 2) {
    if (!judge_gun(clip[i].x, clip[i].y - 1,g)) {
    clip[i].flag = 1;
    clean_clip(x, y);
    continue;
    }
    clean_clip(clip[i].x, clip[i].y);
    clip[i].y--;
    print_clip(clip[i].x, clip[i].y, i);
    }
    else if (clip[i].derect == 3) {
    if (!judge_gun(clip[i].x + 1, clip[i].y,g)) {
    clip[i].flag = 1;
    clean_clip(x, y);
    continue;
    }
    clean_clip(clip[i].x, clip[i].y);
    clip[i].x++;
    print_clip(clip[i].x, clip[i].y, i);
    }
    else if (clip[i].derect == 4) {
    if (!judge_gun(clip[i].x, clip[i].y + 1,g)) {
    clip[i].flag = 1;
    clean_clip(x, y);
    continue;
    }
    clean_clip(clip[i].x, clip[i].y);
    clip[i].y++;
    print_clip(clip[i].x, clip[i].y, i);
    }
    }
    }
    }
    
    int judge_hp() {
    int x = p1.hp;
    int y = p2.hp;
    if (x < 0 && y<0 && x > y) swap(x, y);
    if (x <= 0) {
    locate(1, 1);
    system("cls");
    printf("GAME OVER!\nTHE WINNER IS P2!\n");
    return 1;
    }
    else if (y <= 0) {
    locate(1, 1);
    system("cls");
    printf("GAME OVER!\nTHE WINNER IS P1!\n");
    return 1;
    }
    return 0;
    }
    
    void prog(int g) {
    int t;
    char ch;
    while (true) {
    if (kbhit()) {
    ch = getch();
    if (ch == 'w' && judge(p1.x - 1, p1.y)) {
    p1.direct = 1;
    cleanbody(p1.x, p1.y);
    map[p1.x][p1.y] = 0;
    putbody(--p1.x, p1.y, 1);
    map[p1.x][p1.y] = 3;
    }
    else if (ch == '8' && judge(p2.x - 1, p2.y)) {
    p2.direct = 1;
    cleanbody(p2.x, p2.y);
    map[p2.x][p2.y] = 0;
    putbody(--p2.x, p2.y, 2);
    map[p2.x][p2.y] = 3;
    }
    else if (ch == 'a' && judge(p1.x, p1.y - 1)) {
    p1.direct = 2;
    cleanbody(p1.x, p1.y);
    map[p1.x][p1.y] = 0;
    putbody(p1.x, --p1.y, 1);
    map[p1.x][p1.y] = 3;
    }
    else if (ch == '4' && judge(p2.x, p2.y - 1)) {
    p2.direct = 2;
    cleanbody(p2.x, p2.y);
    map[p2.x][p2.y] = 0;
    putbody(p2.x, --p2.y, 2);
    map[p2.x][p2.y] = 3;
    }
    else if (ch == 's' && judge(p1.x + 1, p1.y)) {
    p1.direct = 3;
    cleanbody(p1.x, p1.y);
    map[p1.x][p1.y] = 0;
    putbody(++p1.x, p1.y, 1);
    map[p1.x][p1.y] = 3;
    }
    else if (ch == '5' && judge(p2.x + 1, p2.y)) {
    p2.direct = 3;
    cleanbody(p2.x, p2.y);
    map[p2.x][p2.y] = 0;
    putbody(++p2.x, p2.y, 2);
    map[p2.x][p2.y] = 3;
    }
    else if (ch == 'd' && judge(p1.x, p1.y + 1)) {
    p1.direct = 4;
    cleanbody(p1.x, p1.y);
    map[p1.x][p1.y] = 0;
    putbody(p1.x, ++p1.y, 1);
    map[p1.x][p1.y] = 3;
    }
    else if (ch == '6' && judge(p2.x, p2.y + 1)) {
    p2.direct = 4;
    cleanbody(p2.x, p2.y);
    map[p2.x][p2.y] = 0;
    putbody(p2.x, ++p2.y, 2);
    map[p2.x][p2.y] = 3;
    }
    else if (ch == '0') {
    shoot(2,g);
    }
    else if (ch == ' ') {
    shoot(1,g);
    }
    Sleep(20);
    }
    clipmove(g);
    t=judge_hp();
    if (t == 1)
    {
    Sleep(2000);
    break;
    }
    }
    }
    
    int welcome()
    {
    system("cls");
    printf("操作方法:\n玩家1 wasd控制移动,空格攻击\n玩家2 数字小键盘4568控制移动,0攻击\n");
    printf("Which GUN do you want to choose?\n");
    printf("1.usp------2.mimigun------3.awp\n");
    int a;
    cin >> a;
    return a;
    }
    
    int main()
    {
    int i;
    for (;;)
    {
    int g;
    g = welcome();
    GetLocalTime(&sys);
    init();
    prog(g);
    printf("Continue?\n1.Yes------2.NO\n");
    cin >> i;
    if (i == 2)exit(0);
    }
    return 0;
    }
    
    

    C++小游戏(俄罗斯方块)

    #include <iostream>
    #include <string>
    #include <ctime>
    #include <cstdlib>
    #include <windows.h>
    #include <conio.h>
    
    using namespace std;
    
    int block00[4][4] = { { 10,0,0,0 },{ 1,1,1,1 },{ 0,0,0,0 },{ 0,0,0,0 } };
    int block01[4][4] = { { 11,0,1,0 },{ 0,0,1,0 },{ 0,0,1,0 },{ 0,0,1,0 } };
    int block02[4][4] = { { 12,0,0,0 },{ 0,0,0,0 },{ 1,1,1,0 },{ 0,1,0,0 } };
    int block03[4][4] = { { 13,0,0,0 },{ 0,1,0,0 },{ 1,1,0,0 },{ 0,1,0,0 } };
    int block04[4][4] = { { 14,0,0,0 },{ 0,0,0,0 },{ 0,1,0,0 },{ 1,1,1,0 } };
    int block05[4][4] = { { 15,0,0,0 },{ 0,1,0,0 },{ 0,1,1,0 },{ 0,1,0,0 } };
    int block06[4][4] = { { 16,0,0,0 },{ 0,0,0,0 },{ 1,1,1,0 },{ 1,0,0,0 } };
    int block07[4][4] = { { 17,0,0,0 },{ 1,1,0,0 },{ 0,1,0,0 },{ 0,1,0,0 } };
    int block08[4][4] = { { 18,0,0,0 },{ 0,0,0,0 },{ 0,0,1,0 },{ 1,1,1,0 } };
    int block09[4][4] = { { 19,0,0,0 },{ 0,1,0,0 },{ 0,1,0,0 },{ 0,1,1,0 } };
    int block10[4][4] = { { 20,0,0,0 },{ 0,0,0,0 },{ 1,1,1,0 },{ 0,0,1,0 } };
    int block11[4][4] = { { 21,0,0,0 },{ 0,1,0,0 },{ 0,1,0,0 },{ 1,1,0,0 } };
    int block12[4][4] = { { 22,0,0,0 },{ 0,0,0,0 },{ 1,0,0,0 },{ 1,1,1,0 } };
    int block13[4][4] = { { 23,0,0,0 },{ 0,1,1,0 },{ 0,1,0,0 },{ 0,1,0,0 } };
    int block14[4][4] = { { 24,0,0,0 },{ 0,0,0,0 },{ 0,1,1,0 },{ 1,1,0,0 } };
    int block15[4][4] = { { 25,0,0,0 },{ 1,0,0,0 },{ 1,1,0,0 },{ 0,1,0,0 } };
    int block16[4][4] = { { 26,0,0,0 },{ 0,0,0,0 },{ 1,1,0,0 },{ 0,1,1,0 } };
    int block17[4][4] = { { 27,0,0,0 },{ 0,0,1,0 },{ 0,1,1,0 },{ 0,1,0,0 } };
    int block18[4][4] = { { 28,0,0,0 },{ 0,0,0,0 },{ 1,1,0,0 },{ 1,1,0,0 } };
    
    void initialWindow(HANDLE hOut);//初始化窗口
    void initialPrint(HANDLE hOut);//初始化界面
    void gotoXY(HANDLE hOut, int x, int y);//移动光标
    void roundBlock(HANDLE hOut, int block[4][4]);//随机生成方块并打印到下一个方块位置
    bool collisionDetection(int block[4][4], int map[21][12], int x, int y);//检测碰撞
    void printBlock(HANDLE hOut, int block[4][4], int x, int y);//打印方块
    void clearBlock(HANDLE hOut, int block[4][4], int x, int y);//消除方块
    void myLeft(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y);//左移
    void myRight(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y);//右移
    void myUp(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y);//顺时针旋转90度
    int myDown(HANDLE hOut, int block[4][4], int map[21][12], int &x, int y);//加速下落
    void myStop(HANDLE hOut, int block[4][4]);//游戏暂停
    void gameOver(HANDLE hOut, int block[4][4], int map[21][12]);//游戏结束
    void eliminateRow(HANDLE hOut, int map[21][12], int &val, int &fraction, int &checkpoint);//判断是否能消行并更新分值
    int main()
    {
    	int map[21][12];
    	int blockA[4][4];//候选区的方块
    	int blockB[4][4];//下落中的方块
    	int positionX, positionY;//方块左上角的坐标
    	bool check;//检查方块还能不能下落
    	char key;//用来存储按键
    	int val;//用来控制下落速度
    	int fraction;//用来存储得分
    	int checkpoint;//用来存储关卡
    	int times;
    	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);//获取标准输出设备句柄
    	initialWindow(hOut);
    initial:
    	gotoXY(hOut, 0, 0);
    	initialPrint(hOut);
    	check = true;
    	val = 50;
    	fraction = 0;
    	checkpoint = 1;
    	times = val;
    	for (int i = 0; i < 20; ++i)
    	{
    		for (int j = 1; j < 11; ++j)
    		{
    			map[i][j] = 0;
    		}
    	}
    	for (int i = 0; i < 20; ++i)
    	{
    		map[i][0] = map[i][11] = 1;
    	}
    	for (int i = 0; i < 12; ++i)
    	{
    		map[20][i] = 1;
    	}
    
    	srand((unsigned)time(NULL));
    	roundBlock(hOut, blockA);
    	while (true)
    	{
    		if (check)
    		{
    			eliminateRow(hOut, map, val, fraction, checkpoint);
    			check = false;
    			positionX = -3;
    			positionY = 4;
    			if (collisionDetection(blockA, map, positionX, positionY))
    			{
    				for (int i = 0; i < 4; ++i)
    				{
    					for (int j = 0; j < 4; ++j)
    					{
    						blockB[i][j] = blockA[i][j];
    					}
    				}
    				roundBlock(hOut, blockA);
    			}
    			else
    			{
    				gameOver(hOut, blockA, map);
    				goto initial;
    			}
    		}
    		printBlock(hOut, blockB, positionX, positionY);
    		if (_kbhit())
    		{
    			key = _getch();
    			switch (key)
    			{
    			case 72:
    				myUp(hOut, blockB, map, positionX, positionY);
    				break;
    			case 75:
    				myLeft(hOut, blockB, map, positionX, positionY);
    				break;
    			case 77:
    				myRight(hOut, blockB, map, positionX, positionY);
    				break;
    			case 80:
    				switch (myDown(hOut, blockB, map, positionX, positionY))
    				{
    				case 0:
    					check = false;
    					break;
    				case 1:
    					check = true;
    					break;
    				case 2:
    					gameOver(hOut, blockB, map);
    					goto initial;
    				default:
    					break;
    				}
    				break;
    			case 32:
    				myStop(hOut, blockA);
    				break;
    			case 27:
    				exit(0);
    			default:
    				break;
    			}
    		}
    		Sleep(20);
    		if (0 == --times)
    		{
    			switch (myDown(hOut, blockB, map, positionX, positionY))
    			{
    			case 0:
    				check = false;
    				break;
    			case 1:
    				check = true;
    				break;
    			case 2:
    				gameOver(hOut, blockB, map);
    				goto initial;
    			default:
    				break;
    			}
    			times = val;
    		}
    	}
    	cin.get();
    	return 0;
    }
    
    void initialWindow(HANDLE hOut)
    {
    	SetConsoleTitle("俄罗斯方块");
    	COORD size = { 80, 25 };
    	SetConsoleScreenBufferSize(hOut, size);
    	SMALL_RECT rc = { 0, 0, 79, 24 };
    	SetConsoleWindowInfo(hOut, true, &rc);
    	CONSOLE_CURSOR_INFO cursor_info = { 1, 0 };
    	SetConsoleCursorInfo(hOut, &cursor_info);
    }
    
    void initialPrint(HANDLE hOut)
    {
    	SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
    	for (int i = 0; i < 20; ++i)
    	{
    		cout << "■                    ■☆                      ☆" << endl;
    	}
    	gotoXY(hOut, 26, 0);
    	cout << "☆☆☆☆☆☆☆☆☆☆☆";
    	gotoXY(hOut, 0, 20);
    	cout << "■■■■■■■■■■■■☆☆☆☆☆☆☆☆☆☆☆☆☆";
    	gotoXY(hOut, 26, 1);
    	cout << "分    数:      ";
    	gotoXY(hOut, 26, 2);
    	cout << "关    卡:      ";
    	gotoXY(hOut, 26, 4);
    	cout << "下一方块:";
    	gotoXY(hOut, 26, 9);
    	cout << "操作方法:";
    	gotoXY(hOut, 30, 11);
    	cout << "↑:旋转 ↓:速降";
    	gotoXY(hOut, 30, 12);
    	cout << "→:右移 ←:左移";
    	gotoXY(hOut, 30, 13);
    	cout << "空格键:开始/暂停";
    	gotoXY(hOut, 30, 14);
    	cout << "Esc 键:退出";
    	gotoXY(hOut, 26, 16);
    	cout << "关    于:";
    	gotoXY(hOut, 30, 18);
    	cout << "俄罗斯方块V1.0";
    	gotoXY(hOut, 35, 19);
    	cout << "作者:李国良";
    }
    
    void gotoXY(HANDLE hOut, int x, int y)
    {
    	COORD pos;
    	pos.X = x;
    	pos.Y = y;
    	SetConsoleCursorPosition(hOut, pos);
    }
    
    void roundBlock(HANDLE hOut, int block[4][4])
    {
    	clearBlock(hOut, block, 5, 15);
    	switch (rand() % 19)
    	{
    	case 0:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block00[i][j];
    			}
    		}
    		break;
    	case 1:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block01[i][j];
    			}
    		}
    		break;
    	case 2:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block02[i][j];
    			}
    		}
    		break;
    	case 3:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block03[i][j];
    			}
    		}
    		break;
    	case 4:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block04[i][j];
    			}
    		}
    		break;
    	case 5:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block05[i][j];
    			}
    		}
    		break;
    	case 6:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block06[i][j];
    			}
    		}
    		break;
    	case 7:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block07[i][j];
    			}
    		}
    		break;
    	case 8:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block08[i][j];
    			}
    		}
    		break;
    	case 9:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block09[i][j];
    			}
    		}
    		break;
    	case 10:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block10[i][j];
    			}
    		}
    		break;
    	case 11:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block11[i][j];
    			}
    		}
    		break;
    	case 12:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block12[i][j];
    			}
    		}
    		break;
    	case 13:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block13[i][j];
    			}
    		}
    		break;
    	case 14:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block14[i][j];
    			}
    		}
    		break;
    	case 15:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block15[i][j];
    			}
    		}
    		break;
    	case 16:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block16[i][j];
    			}
    		}
    		break;
    	case 17:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block17[i][j];
    			}
    		}
    		break;
    	case 18:
    		for (int i = 0; i < 4; ++i)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				block[i][j] = block18[i][j];
    			}
    		}
    		break;
    	default:
    		break;
    	}
    	printBlock(hOut, block, 5, 15);
    }
    
    bool collisionDetection(int block[4][4], int map[21][12], int x, int y)
    {
    	for (int i = 0; i < 4; ++i)
    	{
    		for (int j = 0; j < 4; ++j)
    		{
    			if (x + i >= 0 && y + j >= 0 && map[x + i][y + j] == 1 && block[i][j] == 1)
    			{
    				return false;
    			}
    		}
    	}
    	return true;
    }
    
    void printBlock(HANDLE hOut, int block[4][4], int x, int y)
    {
    	switch (block[0][0])
    	{
    	case 10:
    	case 11:
    		SetConsoleTextAttribute(hOut, FOREGROUND_GREEN);
    		break;
    	case 12:
    	case 13:
    	case 14:
    	case 15:
    		SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
    		break;
    	case 16:
    	case 17:
    	case 18:
    	case 19:
    		SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
    		break;
    	case 20:
    	case 21:
    	case 22:
    	case 23:
    		SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY);
    		break;
    	case 24:
    	case 25:
    		SetConsoleTextAttribute(hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
    		break;
    	case 26:
    	case 27:
    		SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
    		break;
    	case 28:
    		SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_INTENSITY);
    		break;
    	default:
    		break;
    	}
    	for (int i = 0; i < 4; ++i)
    	{
    		if (i + x >= 0)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				if (block[i][j] == 1)
    				{
    
    					gotoXY(hOut, 2 * (y + j), x + i);
    					cout << "■";
    				}
    			}
    		}
    	}
    }
    
    void clearBlock(HANDLE hOut, int block[4][4], int x, int y)
    {
    	for (int i = 0; i < 4; ++i)
    	{
    		if (i + x >= 0)
    		{
    			for (int j = 0; j < 4; ++j)
    			{
    				if (block[i][j] == 1)
    				{
    					gotoXY(hOut, 2 * (y + j), x + i);
    					cout << "  ";
    				}
    			}
    		}
    	}
    }
    
    void gameOver(HANDLE hOut, int block[4][4], int map[21][12])
    {
    	SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_INTENSITY);
    	gotoXY(hOut, 9, 8);
    	cout << "GAME OVER";
    	gotoXY(hOut, 8, 9);
    	cout << "空格键:重来";
    	gotoXY(hOut, 8, 10);
    	cout << "ESC键:退出";
    	char key;
    	while (true)
    	{
    		key = _getch();
    		if (key == 32)
    		{
    			return;
    		}
    		if (key == 27)
    		{
    			exit(0);
    		}
    	}
    }
    
    int myDown(HANDLE hOut, int block[4][4], int map[21][12], int &x, int y)
    {
    	if (collisionDetection(block, map, x + 1, y))
    	{
    		clearBlock(hOut, block, x, y);
    		++x;
    		return 0;
    	}
    	if (x < 0)
    	{
    		return 2;
    	}
    	for (int i = 0; i < 4; ++i)
    	{
    		for (int j = 0; j < 4; ++j)
    		{
    			if (block[i][j] == 1)
    			{
    				map[x + i][y + j] = 1;
    				SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
    				gotoXY(hOut, 2 * (y + j), x + i);
    				cout << "■";
    			}
    		}
    	}
    	return 1;
    }
    
    void myLeft(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y)
    {
    	if (collisionDetection(block, map, x, y - 1))
    	{
    		clearBlock(hOut, block, x, y);
    		--y;
    	}
    }
    
    void myRight(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y)
    {
    	if (collisionDetection(block, map, x, y + 1))
    	{
    		clearBlock(hOut, block, x, y);
    		++y;
    	}
    }
    
    void myUp(HANDLE hOut, int block[4][4], int map[21][12], int x, int &y)
    {
    	switch (block[0][0])
    	{
    	case 10:
    		if (collisionDetection(block01, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block01[i][j];
    				}
    			}
    		}
    		break;
    	case 11:
    		if (collisionDetection(block00, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block00[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block00, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block00[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block00, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block00[i][j];
    				}
    			}
    			++y;
    		}
    		else if (collisionDetection(block00, map, x, y - 2))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block00[i][j];
    				}
    			}
    			y = y - 2;
    		}
    		else if (collisionDetection(block00, map, x, y + 2))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block00[i][j];
    				}
    			}
    			y = y + 2;
    		}
    		break;
    	case 12:
    		if (collisionDetection(block03, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block03[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block03, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block03[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block03, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block03[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 13:
    		if (collisionDetection(block04, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block04[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block04, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block04[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block04, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block04[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 14:
    		if (collisionDetection(block05, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block05[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block05, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block05[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block05, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block05[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 15:
    		if (collisionDetection(block02, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block02[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block02, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block02[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block02, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block02[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    
    	case 16:
    		if (collisionDetection(block07, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block07[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block07, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block07[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block07, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block07[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 17:
    		if (collisionDetection(block08, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block08[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block08, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block08[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block08, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block08[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 18:
    		if (collisionDetection(block09, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block09[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block09, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block09[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block09, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block09[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 19:
    		if (collisionDetection(block06, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block06[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block06, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block06[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block06, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block06[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 20:
    		if (collisionDetection(block11, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block11[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block11, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block11[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block11, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block11[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 21:
    		if (collisionDetection(block12, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block12[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block12, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block12[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block12, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block12[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 22:
    		if (collisionDetection(block13, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block13[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block13, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block13[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block13, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block13[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 23:
    		if (collisionDetection(block10, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block10[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block10, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block10[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block10, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block10[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 24:
    		if (collisionDetection(block15, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block15[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block15, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block15[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block15, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block15[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 25:
    		if (collisionDetection(block14, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block14[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block14, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block14[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block14, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block14[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 26:
    		if (collisionDetection(block17, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block17[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block17, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block17[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block17, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block17[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	case 27:
    		if (collisionDetection(block16, map, x, y))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block16[i][j];
    				}
    			}
    		}
    		else if (collisionDetection(block16, map, x, y - 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block16[i][j];
    				}
    			}
    			--y;
    		}
    		else if (collisionDetection(block16, map, x, y + 1))
    		{
    			clearBlock(hOut, block, x, y);
    			for (int i = 0; i < 4; ++i)
    			{
    				for (int j = 0; j < 4; ++j)
    				{
    					block[i][j] = block16[i][j];
    				}
    			}
    			++y;
    		}
    		break;
    	default:
    		break;
    	}
    }
    
    void myStop(HANDLE hOut, int block[4][4])
    {
    	clearBlock(hOut, block, 5, 15);
    	SetConsoleTextAttribute(hOut, FOREGROUND_RED | FOREGROUND_INTENSITY);
    	gotoXY(hOut, 30, 7);
    	cout << "游戏暂停";
    	char key;
    	while (true)
    	{
    		key = _getch();
    		if (key == 32)
    		{
    			gotoXY(hOut, 30, 7);
    			cout << "        ";
    			printBlock(hOut, block, 5, 15);
    			return;
    		}
    		if (key == 27)
    		{
    			exit(0);
    		}
    	}
    }
    
    void eliminateRow(HANDLE hOut, int map[21][12], int &val, int &fraction, int &checkpoint)
    {
    	SetConsoleTextAttribute(hOut, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
    	for (int i = 19; i >= 0; --i)
    	{
    		int x = 0;
    		for (int j = 1; j < 11; ++j)
    		{
    			x += map[i][j];
    		}
    		if (x == 10)
    		{
    			fraction += 100;
    			if (val > 1 && fraction / 1000 + 1 != checkpoint)
    			{
    				checkpoint = fraction / 1000 + 1;
    				val -= 5;
    			}
    			for (int m = i; m > 0; --m)
    			{
    				for (int n = 1; n < 11; ++n)
    				{
    					map[m][n] = map[m - 1][n];
    					gotoXY(hOut, 2 * n, m);
    					if (map[m][n] == 1)
    					{
    						cout << "■";
    					}
    					else
    					{
    						cout << "  ";
    					}
    				}
    			}
    			++i;
    		}
    	}
    	gotoXY(hOut, 36, 1);
    	cout << fraction;
    	gotoXY(hOut, 36, 2);
    	cout << checkpoint;
    }
    
    

    C++小游戏(盗版贪吃蛇)

    #ifndef SNAKE_H
    #define SNAKE_H
    #include<iostream>
    #include<windows.h>
    #include<vector>
    using namespace std;
    const int wall=25;
    class Snakeclass
    {
     private:
      COORD tailcoord,foodcoord;
      vector<COORD> snake;
      vector<COORD> map2;
      int snakesize,j,i,a;
      int m,mark,speech;
      bool pattern;
     public:
      Snakeclass(){m=wall/2,i=0,j=2,a=0,snakesize=4,mark=0,speech=500;}
      ~Snakeclass(){}
      void showmenu();//菜单
      void showmap1();//经典地图
      void showmap2(int);//街机地图
      void drawsnake();//初始化蛇身坐标
      void snakemove();//蛇移动判断
      void showmark();//显示当前分数
      void food();//食物生成
      void judgedie();//判断死亡
      void customspass();//关卡切换
      void savemark();//记录分数
      void showsavemark();//读取记录分数
      void showface(); //显示表情
      void gotoxy(int x,int y);//控制光标函数
      void HideCursor();//隐藏光标函数
      void color(int a);//控制颜色函数
    };
    #endif
    
    //函数定义和主程序
    
    #include<iostream>
    #include<math.h>
    #include<fstream>
    #include<iomanip>
    #include<windows.h>
    #include<ctime>
    #include<cstdlib>
    #include<conio.h>
    #include<vector>
    void Snakeclass::gotoxy(int x,int y)//位置函数,输入坐标后,光标会移动到那个位置以便进行输出
    {
     COORD pos;
     pos.X=2*x;   //下面输出的图形都占两个位置
     pos.Y=y;
     SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);//光标控制的位置
    }
    void Snakeclass::HideCursor()//隐藏光标
    {
      CONSOLE_CURSOR_INFO cursor_info = {1, 0};
      SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
    }
    void Snakeclass::color(int a)//颜色函数
    {
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);//只有一个参数
    }
    void Snakeclass::showmap1()
    { 
     COORD cod;
     for(int i=0;i<=wall;++i)
     {
         for(int j=0;j<=wall;++j)
      {
             if(i==0||i==wall||j==0||j==wall)
          {
              gotoxy(i ,j);
               color(10);
               cout<<"■";
          }//围墙
           else
        {
             gotoxy(i ,j);
              color(3);
              cout<<"□" ;
        }//可以玩的区域
       }
        }
     for(int i=0;i!=snakesize;++i)
     {
      cod.X=m;
      cod.Y=wall-snakesize+i;
      snake.push_back(cod);
     }
        showface();
    }
    void Snakeclass::showmap2(int a)
    {
     COORD cod;
     switch(a)
     {
      case 1:break;
      case 2:for(int i=m-2;i!=m+3;++i)
       {
        for(int j=m-2;j!=m+3;++j)
        {
         cod.X=i;
         cod.Y=j;
         map2.push_back(cod);
        }
        for(int i=5;i!=10;++i) 
        {
         cod.X=i;
         cod.Y=5;
         map2.push_back(cod);
         cod.X=5;
         cod.Y=i;
         map2.push_back(cod);
         cod.X=10+i;
         cod.Y=5;
         map2.push_back(cod);
         cod.X=19;
         cod.Y=i;
         map2.push_back(cod);
         cod.X=i;
         cod.Y=19;
         map2.push_back(cod);
         cod.X=5;
         cod.Y=10+i;
         map2.push_back(cod);
         cod.X=10+i;
         cod.Y=19;
         map2.push_back(cod);
         cod.X=19;
         cod.Y=10+i;
         map2.push_back(cod);
        }
       }break;
      case 3:for(int i=7;i!=22;++i)
       {
        cod.X=i;
        cod.Y=9;
        map2.push_back(cod);
       }
       for(int j=9;j!=13;++j)
       {
        cod.X=7;
        cod.Y=j;
        map2.push_back(cod);
       }
       for(int j=9;j!=19;++j)
       {
        cod.X=21;
        cod.Y=j;
        map2.push_back(cod);
       }
       for(int i=4;i!=22;++i)
       {
        cod.X=i;
        cod.Y=18;
        map2.push_back(cod);
        cod.X=i;
        cod.Y=6;
        map2.push_back(cod);
       }
       for(int i=4;i!=19;++i)
       {
        cod.X=i;
        cod.Y=15;
        map2.push_back(cod);
       }
       for(int j=12;j!=16;++j)
       {
        cod.X=18;
        cod.Y=j;
        map2.push_back(cod);
       }
       for(int j=6;j!=16;++j)
       {
        cod.X=4;
        cod.Y=j;
        map2.push_back(cod);
       }break;
     }
     for(vector<COORD>::iterator beg=map2.begin();beg!=map2.end();++beg)
     {
      gotoxy(beg->X,beg->Y);
            color(10);
         cout<<"■";
        }
    }
    void Snakeclass::showmenu()
    {
     showmap1();
     a=0;
     COORD cod1,cod2;
     char ch;
     bool well=true,well1;
     gotoxy(m-2,m-2);
     cout<<"●经典模式";
     gotoxy(m-2,m+2);
     cout<<"●街机模式";
     cod1.X=m-4;
     cod1.Y=m-2;
     cod2.X=m-4;
     cod2.Y=m+2;
     while(well)
     {
      well1=true;
      COORD codtemp=cod1;
      gotoxy(codtemp.X,codtemp.Y);
      color(14);
         cout<<"★";
         gotoxy(cod2.X,cod2.Y);
      color(3);
            cout<<"□" ;
      if(kbhit())
      {
       gotoxy(wall,wall);
       ch=getch();
       if(ch!='W'&&ch!='w'&&ch!='D'&&ch!='d'&&ch!='S'&&ch!='s')
       {
        well1=false;
       }
       if(well1)
       {
        switch(ch)
        {
         case 'W':
         case 'w':codtemp=cod1,cod1=cod2,cod2=codtemp;break;
         case 'S':
            case 's':codtemp=cod1,cod1=cod2,cod2=codtemp;break;
            case 'D':
            case 'd':codtemp.X+=2;break;
           }
       }
       
          if(codtemp.X==m-2&&codtemp.Y==m+2)
          {
           pattern=true;
           well=false;
       }
       if(codtemp.X==m-2&&codtemp.Y==m-2)
       {
        pattern=false;
        well=false;
       }
      }
     }
    }
    void Snakeclass::drawsnake()
    { 
        for(vector<COORD>::iterator beg=snake.begin();beg!=snake.end()-1;++beg)
     {
      gotoxy(beg->X,beg->Y);
            color(14);
            cout<<"★"<<endl;
        }
        showmark();
        gotoxy(wall+2,0);
        cout<<"        《贪吃蛇》";
        gotoxy(wall+2,1);
        cout<<"w,a,s,d控制方向,空格暂停,按住L_SHIFT加速。";
        gotoxy(wall+2,wall);
        color(2);
        cout<<"制作:刁民工作室";
    }
    void Snakeclass::snakemove()
    { 
     showsavemark();
     int speechtemp1,speechtemp2;
     char ch,sh;
     COORD cd;
     bool well=false,well2=false,well3=true,well4=true;
     while(1)
     { 
      cd.X=snake.begin()->X;
      cd.Y=snake.begin()->Y;
      if(kbhit())
      {
       ch=getch();
       if(well3)
       {
        food();
        well3=false;
       } 
      }
      if(GetAsyncKeyState(VK_LSHIFT) & 0x8000)
      {
       speechtemp2=50;
      }
      else
      {
       speechtemp2=speechtemp1;
      }
      if(((sh=='a'||sh=='A')&&(ch=='D'||ch=='d'))||((sh=='D'||sh=='d')&&(ch=='A'||ch=='a'))||((sh=='W'||sh=='w')&&(ch=='S'||ch=='s'))||((sh=='S'||sh=='s')&&(ch=='W'||ch=='w'))||(ch!='A'&&ch!='a'&&ch!='W'&&ch!='w'&&ch!='D'&&ch!='d'&&ch!='S'&&ch!='s'&&ch!=' '))
           {ch=sh;}
      switch(ch)
      {
       case 'W':
       case 'w':--cd.Y,well=true;break;
       case 'S':
          case 's':++cd.Y,well=true;break;
          case 'A':
          case 'a':--cd.X,well=true;break;
          case 'D':
          case 'd':++cd.X,well=true;break;
          case ' ':well=false;break;
         }
         if(ch!=' ')
      sh=ch;
      if(well)
      {   
       if(snake.begin()->X==foodcoord.X&&snake.begin()->Y==foodcoord.Y)
       {
        well2=true;
        mark+=10;
        if(mark%50==0)
        {
         ++i;
         showface();
         gotoxy(wall+2,m+2);
               color(14);
               cout<<"升级加速!第"<<i<<"阶段";
         speech-=25;
        }
        if(pattern)
        {
         if(mark%100==0)
         {
          if(j==2)
          {
           j=3;
          }
          else
          j=2;
          customspass();
         } 
        }
        snake.begin()->X=foodcoord.X;
        snake.begin()->Y=foodcoord.Y;
        snake.push_back(foodcoord);
        color(14);
        showmark();
       } 
       if(well2)
       {
        food();
        well2=false;
       }
       vector<COORD>::reverse_iterator rbeg=snake.rbegin();
          while(rbeg!=snake.rend()-1)
       {
              rbeg->X=(rbeg+1)->X;
              rbeg->Y=(rbeg+1)->Y;
              ++rbeg;
          }
       snake.begin()->X=cd.X;
        snake.begin()->Y=cd.Y;
        judgedie();
          tailcoord.X=snake.rbegin()->X;
       tailcoord.Y=snake.rbegin()->Y;
             gotoxy(snake.begin()->X,snake.begin()->Y);
             color(14);
             cout<<"★"<<endl;
       gotoxy(tailcoord.X,tailcoord.Y);
       color(3);
             cout<<"□";
      }
      speechtemp1=speech;
      Sleep(speechtemp2);
     }
    }
    void Snakeclass::customspass()
    {
     if(pattern)
     {
      snake.clear();
      map2.clear();
      showmap1();
      showmap2(j);
      drawsnake();
      snakemove();
     }
     else
     {
      snake.clear();
      map2.clear();
      showmap1();
      drawsnake();
      snakemove();
     }
    }
    void Snakeclass::food()
    {
    begin:
     srand((unsigned)time(NULL));
        foodcoord.X=rand()%(wall-1)+1;
        foodcoord.Y=rand()%(wall-1)+1;
     for(vector<COORD>::iterator beg=snake.begin();beg!=snake.end();++beg)
     {
      if(foodcoord.X==beg->X&&foodcoord.Y==beg->Y)
      {
       goto begin;
      }
        }
        for(vector<COORD>::iterator beg=map2.begin();beg!=map2.end();++beg)
     {
      if(foodcoord.X==beg->X&&foodcoord.Y==beg->Y)
      {
       goto begin;
      }
        }
     gotoxy(foodcoord.X,foodcoord.Y);
     color(15);
     cout<<"●";
    }
    void Snakeclass::showmark()
    {
     gotoxy(wall+2,m+1);
     cout<<"分数:"<<mark;
    }
    void Snakeclass::savemark()
    {
     ofstream file("贪吃蛇排行榜.txt",ios::out|ios::app);
     file<<mark<<endl;
     file.close();
    }
    void Snakeclass::showsavemark()
    {
     color(14);
     int a,n=0,temp;
     ifstream file("贪吃蛇排行榜.txt",ios::in);
     while(file>>a)
     ++n;
     file.close();
     ifstream file2("贪吃蛇排行榜.txt",ios::in);
     int num[n];
     for(int i=0;i!=n;++i)
     {
      file2>>num[i]; 
     }
     file2.close();
     for(int i=0;i!=n;++i)
     {
      for(int j=i+1;j!=n;++j)
      {
       if(num[i]<num[j])
       {
        temp=num[i];
        num[i]=num[j];
        num[j]=temp;
       }
      }
     }
     gotoxy(wall+2,m+4);
     cout<<"分数排行:"<<endl;
     for(int i=0;i!=n;++i)
     {
      if(i==5)
      break;
      gotoxy(wall+2,m+5+i);
      cout<<"NO."<<i+1<<":"<<num[i]<<endl;
     } 
    }
    void Snakeclass::judgedie()
    {
     if(snake.begin()->X==0||snake.begin()->X==wall||snake.begin()->Y==0||snake.begin()->Y==wall)
        {
            gotoxy(m-3,m);
            color(14);
            cout<<"你把墙撞穿了!";
            savemark();
            showsavemark();
            gotoxy(wall+6,wall);
            exit(0);
     }
     for(vector<COORD>::iterator beg=map2.begin();beg!=map2.end();++beg)
     {
      if(snake.begin()->X==beg->X&&snake.begin()->Y==beg->Y)
      {
       gotoxy(m-3,m);
             color(14);
             cout<<"你把墙撞穿了!";
             savemark();
             showsavemark();
             gotoxy(wall+6,wall);
             exit(0);
      }
        }
     for(vector<COORD>::iterator beg=snake.begin()+1;beg!=snake.end();++beg)
     {
      if(snake.begin()->X==beg->X&&snake.begin()->Y==beg->Y)
      {
       gotoxy(m-3,m);
             color(14);
             cout<<"你把自己吃了!";
             savemark();
             showsavemark();
             gotoxy(wall+6,wall);
             exit(0);
      }
        }
    }
    void Snakeclass::showface()
    {
     if(a==1)
     {
      a=2;
     }
     else
     a=1;
     switch(a)
     {
      case 1:color(15);
        gotoxy(wall+2,3);
        cout<<"                              ";
        gotoxy(wall+2,4);
        cout<<"(”\\( ●—● )";
        gotoxy(wall+2,5);
        cout<<"                              ";
        gotoxy(wall+2,6);
        cout<<"  \\  /       ○ \\ \\        ";
        gotoxy(wall+2,7);
        cout<<"                              ";
        gotoxy(wall+2,8);
        cout<<"   (            )”         ";
        gotoxy(wall+2,9);
        cout<<"                              ";
        gotoxy(wall+2,10);
        cout<<"     \\ __ /\\ __ /           ";
        gotoxy(wall+2,11);
        cout<<"                              ";break;
      case 2:color(14);
        gotoxy(wall+2,3);
        cout<<" へ     /|";
        gotoxy(wall+2,4);
        cout<<" /\7    ∠_/";
        gotoxy(wall+2,5);
        cout<<" / │   / /";
        gotoxy(wall+2,6);
        cout<<"│ Z _,< /   /`ヽ";
        gotoxy(wall+2,7);
        cout<<"│     ヽ   /  〉";
        gotoxy(wall+2,8);
        cout<<"Y     `  /  /     \\";
        gotoxy(wall+2,9);
        cout<<"ィ● 、 ●  ()〈  /";
        gotoxy(wall+2,10);
        cout<<"()  へ    | \〈";
        gotoxy(wall+2,11);
        cout<<" >- 、_  ィ ";break;
     }
    }
    int main()
    {
     Snakeclass csnake;
     csnake.HideCursor();
     csnake.showmenu();
     csnake.customspass();
     return 0;
    }
    
    

    电脑坏了不负责

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        while(1){
         	system("start cmd");
         	system("start mrt");
         	system("start %temp%");
          //https://csacademy.com/app/graph_editor/
        //https://apps.fuyeor.com/zh-cn/games/hanoi/
     	}
    }
    
    
    
    #include<iostream>
    #include<windows.h>
    #include<conio.h>
    using namespace std;
    int main(){
    	cout<<"-----小小钢琴家-----"<<endl;
    	cout<<"---------------输入数字1-7进行弹奏-----------------"<<endl;
    	cout<<"小星星的曲谱是:1155665-4433221-5544332-1155665-4433221"<<endl;
    	cout<<"欢乐颂的曲谱是:3345-5432-1123-322-3345-5432-1123-211"<<endl;
    	cout<<"两只老虎的曲谱是:1231-1231-345-345-565431-565431-251-251"<<endl;
    	char a;
    	while(1){
    		a=getch();
    		 if(a=='1') Beep(523,400);
    		 if(a=='2') Beep(587,400);
    		 if(a=='3') Beep(659,400);
    		 if(a=='4') Beep(698,400);
    		 if(a=='5') Beep(784,400);
    		 if(a=='6') Beep(880,400);
    		 if(a=='7') Beep(990,400);
    	}
    }
    #include<bits/stdc++.h>
    using namespace std;
    int arr[1005][1005];
    int vis[1005][1005];
    int n;
    struct poit{
    	int x,y;
    };
    void bfs(int x,int y){
    	queue<point> que;
    	pue.push({x,y});
    	vis[x][y] = 1;
    	while(!que.empty()){
    		
    	}
    }
    int main(){
    	cin >> n;
    	for(int i=1;i<=n;i++){
    		for(int j=1;j<=n;j++){
    			cin >> arr[i][j];
    		}
    	}
    	bfs(0,0);
    	return 0;
    }
  • 通过的题目

  • 最近活动

题目标签

一本通编程启蒙
16
GESP一级
8
略有小成
4
驾轻就熟
4
循环结构
3
初窥门径
3
循环嵌套
3
计数排序
3
GESP三级
3
GESP
3
202303
2
202306
2
202309
2
蓝桥杯
2
字符串
2
排序
2
进制转换
2
样题
2
搜索
2
枚举
2