跳到正文

qeswryB

1571065

一位正在打Phigros的DL玩家 主页:https://www.luogu.me/paste/grq4678m

在洛谷打开
资料、奖项与版本

资料

编号
1571065
抓取

奖项

2025 CSP-J
一等奖
2024 CSP-J
二等奖

陶片放逐

+ 发送私信
− 发送私信

查看记录

3921425126
www.arealme.com/zh
Qwen
Watt Toolkit
https://wwbhd.lanzn.com/iV5fG415thif

O(n2)\mathcal{O}(n^2)

好看的图片: https://r.dreamgary.cn/images/hetu.png

https://github.1zyq1.com/ ≪⋘≫⋙\ll \lll \gg \ggg

∑i=1nai                当升科技啊发生大部分                ∏i=1nai\sum^n_{i=1} a_i \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space当升科技啊发生大部分\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space \prod^n_{i=1} a_i

Σ∑Π∏\tt Σ∑Π∏

aΣbcΠdefghi\def\arraystretch{1.5} \begin{array}{ccc} \tt aΣ & \tt b & \tt cΠ \\ \tt d & \tt e & \tt f \\ \tt g & \tt h & \tt i \\ \end{array}

https://cdn.luogu.com.cn/images/bg/1.png([1,31].png都可以) https://ak-ioi.com/apps/oi-2048/ I am a DL player. lanzounetdisk D E E P S E E K

C++
#include<iostream>
#include<cmath>
using namespace std;
int a,b,arr[10];
void dfs(int n){
    if(){}
    for(int i=1;i<=9;i+=2){
        
    }
}
bool is_p(int n){
    for(int i=2;i*i<=n;i++){
        if(n%i==0) return 0;
    }return 1;
}
int main(){
    cin>>a>>b;
    if(a<=5&&5<=b) cout<<5<<'\n';
    if(a<=7&&7<=b) cout<<7<<'\n';
    if(a<=11&&11<=b) cout<<11<<'\n';
    for(int i=3;)
    
    
    return 0;
}

+−×÷=≠≤≥ ∵∴※△△◎○§∝≠≮≯≤≥≈∽≌+-\times\div=\neq\leq\geq\sqrt{\space}∵∴※△\triangle◎○§∝≠≮≯≤≥≈∽≌−

本页面留言板 https://browser-update.org/update-browser.html#3.3.63npm:www.luogu.com.cn
How to stop the input by while(cin>>c)?
在Win中,用[Ctrl]+[Z]+[Enter]结束。

黄色网站
STYLUS
https://cn.mathigon.org/

C++
#include<iostream>
using namespace std;
int main(){
    
    return 0;
}

Tampermonkey for Google Chrome
https://smart-luogu.github.io/ SmartLuogu
P13278
backstreet boys
1 1 1 2 2 2 3 3 3 4 3 1 5 4 4 6 4 2 7 4 1 8 5 5 9 5 3 10 5 1 11 5 2 12 6 6 dianwo
Notebook (qeswryB ONLY)
YbtOJ\color{white}\textsf{\textbf{YbtOJ}}
OI Wiki
doubao

C++
//Maze 5.0 (Difficult Chinese Version)
//WASD操控 
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <conio.h>
#include <windows.h>

using namespace std;

const int WIDTH = 51;   // 迷宫宽度(必须为奇数)
const int HEIGHT = 51;  // 迷宫高度(必须为奇数)

// 控制台颜色常量
const WORD WALL_COLOR = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY;  // 亮白色墙壁
const WORD PATH_COLOR = FOREGROUND_INTENSITY;                                                         // 灰色路径
const WORD PLAYER_COLOR = 0x0;                                        // 蓝底白字玩家
const WORD START_COLOR = BACKGROUND_GREEN | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;                                        // 绿底起点
const WORD END_COLOR = BACKGROUND_RED | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;                                            // 红底终点
const WORD WIN_COLOR = BACKGROUND_RED | BACKGROUND_GREEN ;                         // 黄底胜利

HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);

// 设置控制台颜色
void setColor(WORD color) {
    SetConsoleTextAttribute(hConsole, color);
}

// 生成迷宫函数(保持原样)
void generateMaze(string maze[][WIDTH], int x, int y) {
    int dir[4][2] = {{0,1}, {1,0}, {0,-1}, {-1,0}};
    int order[4] = {0,1,2,3};
    
    for(int i=0; i<4; i++){
        int r = rand()%4;
        swap(order[i], order[r]);
    }
    
    maze[x][y] = "  ";
    
    for(int i=0; i<4; i++){
        int dx = dir[order[i]][0];
        int dy = dir[order[i]][1];
        int nx = x + dx*2;
        int ny = y + dy*2;
        
        if(nx >= 1 && nx < HEIGHT-1 && ny >= 1 && ny < WIDTH-1){
            if(maze[nx][ny] == "墙"){
                maze[x+dx][y+dy] = "  ";
                generateMaze(maze, nx, ny);
            }
        }
    }
}

// 显示迷宫和玩家位置
void displayMaze(string maze[][WIDTH], int playerX, int playerY, bool win) {
    system("cls");  // 清屏
    
    for(int i = 0; i < HEIGHT; i++) {
        for(int j = 0; j < WIDTH; j++) {
            // 玩家位置
            if(i == playerX && j == playerY) {
                setColor(PLAYER_COLOR);
                cout << "我";
                continue;
            }
            
            // 起点位置
            if(i == 1 && j == 1) {
                setColor(START_COLOR);
                cout << "始";
                continue;
            }
            
            // 终点位置
            if(i == HEIGHT-2 && j == WIDTH-2) {
                if(win) {
                    setColor(WIN_COLOR);
                    cout << "终" ;
                } else {
                    setColor(END_COLOR);
                    cout << "终" ;
                }
                continue;
            }
            
            // 其他位置
            if(maze[i][j] == "墙") {
                setColor(WALL_COLOR);
                cout << "墙";
            } else {
                setColor(PATH_COLOR);
                cout << "  ";
            }
        }if(i == HEIGHT - 1) break;
        cout << endl;
    }
    setColor(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);  // 恢复默认颜色
}

int main() {
    // 设置控制台编码支持中文
    
    srand(time(0));
    string maze[HEIGHT][WIDTH];
    
    // 初始化迷宫
    for(int i = 0; i < HEIGHT; i++) {
        for(int j = 0; j < WIDTH; j++) {
            maze[i][j] = "墙";
        }
    }
    
    generateMaze(maze, 1, 1);
    maze[1][1] = "  ";
    maze[HEIGHT-2][WIDTH-2] = "  ";

    int playerX = 1, playerY = 1;
    bool win = false;

    while(true) {
        displayMaze(maze, playerX, playerY, win);
        
        if(win) {
        	setColor(0x20 | 0x40 | 0x1 | 0x2 | 0x4);
            cout << "* 恭喜我成功走出迷宫! *" << endl;
            setColor(0x1 | 0x2 | 0x4);
            break;
        }
        
        // 获取键盘输入
        char input = getch();
        int newX = playerX, newY = playerY;
        
        switch(tolower(input)) {
            case 'w': newX--; break;
            case 's': newX++; break;
            case 'a': newY--; break;
            case 'd': newY++; break;
            case 'q': return 0;  // 退出游戏
        }
        
        // 移动有效性检查
        if(newX >= 0 && newX < HEIGHT && 
           newY >= 0 && newY < WIDTH && 
           maze[newX][newY] == "  ") {
            playerX = newX;
            playerY = newY;
        }else{
        	setColor(0x50 | 0x1 | 0x2 | 0x4);
            cout << "* 啊哦,你被带刺的墙戳穿了 *" << endl;
            setColor(0x1 | 0x2 | 0x4);
            return 0; 
		}
        
        // 胜利条件检查
        if(playerX == HEIGHT-2 && playerY == WIDTH-2) {
            win = true;
        }
    }
    
    return 0;
}

共 2 篇
  1. 闲话

    ~ 忆 昔 ~

    Do space you space remember space this? But space I space failed.