跳到正文

XiArk

1486819

正在重建界园https://www.luogu.com.cn/team/139421 舟ID:487080905

这是 2026年10月26日 存档的第 2 版,不是当前版本。查看当前版本

资料、奖项与版本

资料

编号
1486819
抓取

版本

  1. v5当前
  2. v4
  3. v3
  4. v2
更早的 1 个版本
  1. v1

Haravi ENDFELD 智谱AI——免费API

代码
//////////////////////////////////////////////////////////////////////////////////////
//╔════════════════════════════════════════════════════════════════════════════════╗//
//║                                                                                ║//
//║     █████╗  ██████╗ ██╗  ██╗███╗   ██╗██╗ ██████╗ ██╗  ██╗████████╗███████╗    ║//
//║    ██╔══██╗ ██╔══██╗██║ ██╔╝████╗  ██║██║██╔════╝ ██║  ██║╚══██╔══╝██╔════╝    ║//
//║    ███████║ ██████╔╝█████╔╝ ██╔██╗ ██║██║██║  ███╗███████║   ██║   ███████╗    ║//
//║    ██╔══██║ ██╔══██╗██╔═██╗ ██║╚██╗██║██║██║   ██║██╔══██║   ██║   ╚════██║    ║//
//║    ██║  ██║ ██║  ██║██║  ██╗██║ ╚████║██║╚██████╔╝██║  ██║   ██║   ███████║    ║//
//║    ╚═╝  ╚═╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚══════╝    ║//
//║                                                                                ║//
//╚════════════════════════════════════════════════════════════════════════════════╝//
///////////////////////////////////////////////////////////////////////////////////////////////////////
//╔═════════════════════════════════════════════════════════════════════════════════════════════════╗//
//║ █████╗  ██████╗ ██╗  ██╗███╗   ██╗██╗ ██████╗ ██╗  ██╗████████╗███████╗                         ║//
//║██╔══██╗ ██╔══██╗██║ ██╔╝████╗  ██║██║██╔════╝ ██║  ██║╚══██╔══╝██╔════╝                         ║//
//║███████║ ██████╔╝█████╔╝ ██╔██╗ ██║██║██║  ███╗███████║   ██║   ███████╗                         ║//
//║██╔══██║ ██╔══██╗██╔═██╗ ██║╚██╗██║██║██║   ██║██╔══██║   ██║   ╚════██║                         ║//
//║██║  ██║ ██║  ██║██║  ██╗██║ ╚████║██║╚██████╔╝██║  ██║   ██║   ███████║                         ║//
//║╚═╝  ╚═╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚══════╝                         ║//
//║                                                                                                 ║//
//║                                  ███████╗███╗   ██╗██████╗ ███████╗██╗███████╗██╗     ██████╗   ║//
//║                                  ██╔════╝████╗  ██║██╔══██╗██╔════╝██║██╔════╝██║     ██╔══██╗  ║//
//║                                  █████╗  ██╔██╗ ██║██║  ██║█████╗  ██║█████╗  ██║     ██║  ██║  ║//
//║                                  ██╔══╝  ██║╚██╗██║██║  ██║██╔══╝  ██║██╔══╝  ██║     ██║  ██║  ║//
//║                                  ███████╗██║ ╚████║██████╔╝██║     ██║███████╗███████╗██████╔╝  ║//
//║                                  ╚══════╝╚═╝  ╚═══╝╚═════╝ ╚═╝     ╚═╝╚══════╝╚══════╝╚═════╝   ║//
//║                                                                                                 ║//
//╚═════════════════════════════════════════════════════════════════════════════════════════════════╝//
///////////////////////////////////////////////////////////////////////////////////////////////////////
C++
#include<bits/stdc++.h>
#include<windows.h>
#include<thread>
#include<mutex>
using namespace std;
string name;
mutex consoleMutex;
atomic<bool> tiaFinished{false};
mt19937 loding(std::random_device{}());
uniform_int_distribution<int>loding1(1,6);
HANDLE hConsole=GetStdHandle(STD_OUTPUT_HANDLE);
void showCursor()
{
	CONSOLE_CURSOR_INFO cursorInfo;
	GetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursorInfo);
	cursorInfo.bVisible=true;
	SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursorInfo);
}
void getCenter(double &cx,double &cy)//获取控制台中心坐标
{
	CONSOLE_SCREEN_BUFFER_INFO csbi;
	GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
	cx=csbi.srWindow.Right/2;
	cy=csbi.srWindow.Bottom/2;
}
void gotoxy(double x,double y)// 移动光标到指定位置
{
	COORD pos={(SHORT)x,(SHORT)y};
	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}//█
void hideCursor()// 隐藏光标
{
	CONSOLE_CURSOR_INFO cursorInfo;
	GetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursorInfo);
	cursorInfo.bVisible = false;
	SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursorInfo);
}
void clearChar(double x,double y)//清除
{
	lock_guard<mutex>lock(consoleMutex);
	gotoxy(x,y);
	cout<<" ";
}
void tia()
	{
	double cx,cy;
	getCenter(cx,cy);
	cy=20;
	string tioa="██████████████████████████████";
	double startX=cx-15.5;//让文字居中显示
	hideCursor();
	for(double i=0;i<30;i++)
	{
		int p=loding1(loding);
		bool longSleep=(p%3==0);
		{
			lock_guard<mutex>lock(consoleMutex);
			SetConsoleTextAttribute(hConsole,10);
			gotoxy(startX+i,cy);
			cout<<"█";
		}
		if(longSleep)Sleep(1500);
		else Sleep(50);
	}
	tiaFinished=true;
	gotoxy(0,cy+2);//移光标
}
void ldg()
{
	double cx,cy;
	getCenter(cx,cy);
	string lod="loading...";
	double startX=cx-5;//让文字居中显示
	for(double i=1;i<=100;i++)
	{
		if(tiaFinished)return;
		for(double i=7;i<10;i++)
		{
			{
				if(tiaFinished)return;
				lock_guard<mutex>lock(consoleMutex);
				SetConsoleTextAttribute(hConsole,15);
				gotoxy(startX+i,cy);
				cout<<".";
				if(tiaFinished)return;
			}
			if(tiaFinished)return;
			Sleep(200);
		}
		for(double i=9;i>=7;i--)
		{
			if(tiaFinished)return;
			clearChar(startX+i,cy);
		}
		if(tiaFinished)return;
		Sleep(200);
	}
	gotoxy(0,cy+2);//移光标
}
void login()
{
	double cx,cy;
	getCenter(cx,cy);
	double startX=cx-15.5;//让文字居中显示
	hideCursor();cy=20;
	for(double i=0;i<30;i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,8);
		gotoxy(startX+i,cy);
		cout<<"█";
	}
	getCenter(cx,cy);
	string lod="loading...";
	startX=cx-lod.length()/2+0.5;//让文字居中显示
	for(double i=0;i<7;i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,15);
		gotoxy(startX+i,cy);
		cout<<lod[i];
		Sleep(50);
	}
	thread lg(ldg);
	thread tiao(tia);
	lg.detach();
	tiao.join();  
	getCenter(cx,cy);
	startX=cx-15.5;//让文字居中显示
	hideCursor();cy=20;
	for(double i=0;i<30;i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,8);
		gotoxy(startX+i,cy);
		cout<<"█";
	}
}
void wel()
{
	double cx,cy;
	getCenter(cx,cy);
	string lod="Welcome";
	double startX=cx-lod.length()/2;//让文字居中显示
	for(double i=0;i<7;i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,15);
		gotoxy(startX+i,cy);
		cout<<lod[i];
		Sleep(50);
	}
	Sleep(1500);
	getCenter(cx,cy);
	lod="       ";
	startX=cx-lod.length()/2;//让文字居中显示
	for(double i=0;i<7;i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,15);
		gotoxy(startX+i,cy);
		cout<<lod[i];
		Sleep(50);
	}
	getCenter(cx,cy);
	lod="Remember to turn on Caps Lock.";
	startX=cx-lod.length()/2;//让文字居中显示
	for(double i=0;i<lod.length();i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,15);
		gotoxy(startX+i,cy);
		cout<<lod[i];
		Sleep(50);
	}
	Sleep(1500);
	getCenter(cx,cy);
	lod="                              ";
	startX=cx-lod.length()/2;//让文字居中显示
	for(double i=0;i<lod.length();i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,15);
		gotoxy(startX+i,cy);
		cout<<lod[i];
		Sleep(50);
	}
	getCenter(cx,cy);
	lod="-please login-";
	startX=cx-lod.length()/2;//让文字居中显示
	for(double i=0;i<lod.length();i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,15);
		gotoxy(startX+i,cy);
		cout<<lod[i];
		Sleep(50);
	}
	Sleep(1500);
	getCenter(cx,cy);
	lod="              ";
	startX=cx-lod.length()/2;//让文字居中显示
	for(double i=0;i<lod.length();i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,15);
		gotoxy(startX+i,cy);
		cout<<lod[i];
		Sleep(50);
	}
	getCenter(cx,cy);
	lod="A.Old Player        B.New Player";
	startX=cx-lod.length()/2;//让文字居中显示
	for(double i=0;i<lod.length();i++)
	{
		lock_guard<mutex>lock(consoleMutex);
		SetConsoleTextAttribute(hConsole,15);
		gotoxy(startX+i,cy);
		cout<<lod[i];
		Sleep(50);
	}
	getCenter(cx,cy);cy+=5;cx-=0.5;
	gotoxy(cx,cy);
	showCursor();
	bool p;cin>>p;
	system("cls");
}
int main()
{
	system("cls");login();//清屏
	SetConsoleTextAttribute(hConsole,15);
	system("cls");wel();
	return 0;
}