跳到正文

剪贴板

剪贴板 tgm1sg7f

原文
剪贴板信息

剪贴板信息

收录
更新

俯瞰春来万物,荣华纷呈,才是长河一点红。
又迎仲夏时日,翠绿是永恒~~~

--------------------------------------------------正文---------------------------------------------
感谢智慧的

张老师

的辛苦付出!
还有努力的

胎神大大!

玩命施工中……
灵感:
https://www.luogu.com/article/q6rnazze
&
https://www.luogu.com/article/mr72sm0s

C++
#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#include<time.h>
//#include<thread>

#define ce cout<<endl;
#define cp system("cls");
#define sl Sleep(1000);
#define cutcl ;Sleep(15);cout
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)//CSDN抄的 
POINT p;//CSDN抄的
HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE);//CSDN抄的
HWND h=GetForegroundWindow();//CSDN抄的
CONSOLE_FONT_INFO consoleCurrentFont;//CSDN抄的
using namespace std;
struct bul{
	bool fl;
	int sx,sy,nx,ny,ex,ey,lstm,spd;
};
struct chr{
	char c;
	short f,b;
};
//发展,资源 
int fo=0,wo=0,mt=0,tek=0,dia=0,pcs=0,grad=-1;
//战斗 
int spl[5];
int fmap[237][61];
chr bp[237][61]; 
int mhlt=200,mdmg,mreg,mdfd;
int maosx,maosy,myx=235,myy=58,myhlt=mhlt,mydmg=mdmg,myreg=mreg,mydfd=mdfd;
int bsx=117,bsy=30,bshlt=1000;
//系统 
string vers="v1.0";
char g;
/*struct dat{
	bool typ;
};*/
//dat me;
int imap[237][61];
/*struct quad{
	int vl,fcl,bcl;
};
quad omap[237][61]; */

void gotoxy(short x, short y) {
	COORD pos = {x,y};
	HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);// 获取标准输出设备句柄
	SetConsoleCursorPosition(hOut, pos);//两个参数分别是指定哪个窗体,具体位置
}
void pchr(char s,int color,int back_color){
	HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
 	SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | back_color*16 |FOREGROUND_INTENSITY | color);
	cout<<s;
 	SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | 7);
}
void pch(char s,int color,int back_color){
	HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
 	//SetConsoleTextAttribute(handle,FOREGROUND_INTENSITY | color);
	cout<<s;
 	//SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | 7);
}
void pmap(){
	for(int j=0;j<61;j++){
		gotoxy(0,j);
		for(int i=0;i<237;i++) {
			pch(bp[i][j].c,bp[i][j].f,bp[i][j].b);
			//bp[i][j].b=0;
			bp[i][j].c=' ';
			bp[i][j].f=0;
		}
		cout<<endl;
	}
}
void slotyp(string s,int spd){
	int q=s.length();
	for(int i=0;i<q;i++){
		cout<<s[i];
		Sleep(spd);
	}
} 
void clrstyp(string s,int spd,int color)
{
	int q=s.length();
	for(int i=0;i<q;i++){
 		HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
 		SetConsoleTextAttribute(handle,FOREGROUND_INTENSITY | color);
		cout<<s[i];
 		SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | 7);
		Sleep(spd);
	}
}
void clrtyp(string s,int color)
{
	int q=s.length();
	for(int i=0;i<q;i++){
 		HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
 		SetConsoleTextAttribute(handle,FOREGROUND_INTENSITY | color);
		cout<<s[i];
 		SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | 7);
	}
}
void clrstypb(string s,int spd,int color,int back_color)
{
	int q=s.length();
	for(int i=0;i<q;i++){
 		HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
 		SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | back_color*16 |FOREGROUND_INTENSITY | color);
		cout<<s[i];
 		SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | 7);
		Sleep(spd);
	}
}
void clrtypb(string s,int color,int back_color)
{
	int q=s.length();
	for(int i=0;i<q;i++){
 		HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
 		SetConsoleTextAttribute(handle, BACKGROUND_INTENSITY | back_color*16 |FOREGROUND_INTENSITY | color);
		cout<<s[i];
 		SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | 7);
	}
}
struct sknm{
	int stx,sty,endx,endy;
};
void ioird(){
	clrstyp("                                        IIIIIIIIIIIIIIIIIIIIIIIIIII                                              OOOOOOOOOOO                                          IIIIIIIIIIIIIIIIIIIIIIIIIII                                        ",0,4); ce
	clrstyp("                                                    IIIII                                                     OOOOO       OOOOO                                                  IIIII                                                   ",0,4); ce
	clrstyp("                                                    IIIII                                                  OOOOO             OOOOO                                               IIIII                                                   ",0,4); ce
	clrstyp("                                                    IIIII                                                OOOOO                 OOOOO                                             IIIII                                                   ",0,4); ce
	clrstyp("                                                    IIIII                                              OOOOO                     OOOOO                                           IIIII                                                   ",0,4); ce
	clrstyp("                                                   IIIII                                              OOOOO                       OOOOO                                         IIIII                                                    ",0,4); ce
	clrstyp("                                                   IIIII                                              OOOOO                       OOOOO                                         IIIII                                                    ",0,4); ce
	clrstyp("                                                   IIIII                                              OOOOO                       OOOOO                                         IIIII                                                    ",0,4); ce
	clrstyp("                                                   IIIII                                              OOOOO                       OOOOO                                         IIIII                                                    ",0,4); ce
	clrstyp("                                                  IIIII                                               OOOOO                       OOOOO                                        IIIII                                                     ",0,4); ce
	clrstyp("                                                  IIIII                                               OOOOO          之路         OOOOO                                        IIIII                                                     ",0,4); ce
	clrstyp("                                                  IIIII                                               OOOOO                       OOOOO                                        IIIII                                                     ",0,4); ce
	clrstyp("                                                  IIIII                                               OOOOO                       OOOOO                                        IIIII                                                     ",0,4); ce
	clrstyp("                                                 IIIII                                                OOOOO                       OOOOO                                       IIIII                                                      ",0,4); ce
	clrstyp("                                                 IIIII                                                OOOOO                       OOOOO                                       IIIII                                                      ",0,4); ce
	clrstyp("                                                 IIIII                                                OOOOO                       OOOOO                                       IIIII                                                      ",0,4); ce
	clrstyp("                                                 IIIII                                                OOOOO                       OOOOO                                       IIIII                                                      ",0,4); ce
	clrstyp("                                                IIIII                                                  OOOOO                     OOOOO                                       IIIII                                                       ",0,4); ce
	clrstyp("                                                IIIII                                                    OOOOO                 OOOOO                                         IIIII                                                       ",0,4); ce
	clrstyp("                                                IIIII                                                      OOOOO              OOOOO                                          IIIII                                                       ",0,4); ce
	clrstyp("                                                IIIII                                                         OOOOO        OOOOO                                             IIIII                                                       ",0,4); ce
	clrstyp("                                      IIIIIIIIIIIIIIIIIIIIIIIIIII                                                OOOOOOOOOOO                                       IIIIIIIIIIIIIIIIIIIIIIIIIII                                           ",0,4); ce 
	//22
}
int read(){
  ifstream in("IOI之路.txt");
  int chk2,chk=0;
  string versn;
  in>>versn;
	if(versn!=vers) return -1;
	in>>fo>>wo>>mt>>tek>>dia>>pcs>>grad>>chk2;
	chk=fo*127+wo*53+mt*11+tek*91+dia*101+pcs*61+grad*23;
	if(chk2==chk){
  	in.close();
		return 0;
	}
	in.close();
	return 1;
}
void write(){
	ofstream out("IOI之路.txt");
	out<<vers<<'\n'<<fo<<' '<<wo<<' '<<mt<<' '<<tek<<' '<<dia<<' '<<pcs<<' '<<grad<<' '<<'\n';
	int chk=0;
	chk=fo*127+wo*53+mt*11+tek*91+dia*101+pcs*61+grad*23;
	out<<chk;
	out.close();
}
void mm(){
	cp
	cout<<"存读档(读档按1,存档按2,按其他按键退出。)"<<endl;
	g=getch();
	switch(g){
		case '1':{
			char a=read();
			if(a==0){
				cout<<"读档成功!"<<endl;
				Sleep(1000);
			}
			else if(a==1){
				cout<<"读档失败!这个档一定被修改过!"<<endl;
				Sleep(1000);
				slotyp("啊。。。。。。愚味无知的黑客啊。。。。。。",100);
				ce
				Sleep(1000);
				slotyp("接受来自IOI T6的处罚吧!!!",20);
				cout<<endl;
				Sleep(1000);
				ce
				cout<<"关机了。。。"<<endl;//system("shutdown -s -t 1");
			}
			else if(a==-1){
				cout<<"版本不一样呢。。。请找更新版本。"; 
			}
			break;
		}
		case '2':{
			write();
			cout<<"存档成功!"<<endl;
			Sleep(1000);
			break;
		}
	} 
	return; 
}

/*
void dealdmg(int centx,int centy,int xwid,int ywid,int dmg){
	for(int i=centx-xwid;i<=centx+xwid;i++) {
		gotoxy(centx-i,centy-ywid);
		for(int j=centy-ywid;j<=centy+ywid;j++) {
			if(fmap[i][j]==2) bshlt-=dmg;
			clrtypb("a",0,1);
		}
	}
	gotoxy(centx,centy);
	clrtypb("Q",0,6);
}
*/

void quaddmg(int centx,int centy,int xwid,int ywid,int dmg){
	for(int j=centy-ywid;j<=centy+ywid;j++) {
		//gotoxy(centx-xwid,centy+j-centy);
		for(int i=centx-xwid;i<=centx+xwid;i++) {
			if(fmap[i][j]==2) bshlt-=dmg;
			//clrtypb(" ",0,1);
		}
	}
	gotoxy(centx,centy);
	//clrtypb("Q",0,6);
}
void circdmg(int mosx,int mosy,int size,int dmg){
	for(int i=0-size;i<=size;i++){
		for(int j=mosy-(sqrt(size*size-i*i))/2;j<mosy+(sqrt(size*size-i*i))/2;j++){
			if(fmap[i][j]==2) {
				bshlt-=dmg;
				//bp[i][j].c='e';
			}
			
		}
	}
}
//技能区
/*
bul bua(bul bullt){//平A,一次函数立大功 
	double ycfk=(bullt.ex-bullt.sx)/(bullt.ey-bullt.sy);
	
}*/
int win(){
	sl sl
	cp
	clrstyp("YOU! WIN!",0,6);
	sl
}
int lose(){
	cp
	clrstyp("YOU! FAIL!",0,4);
	sl
}
void draw_halo(int mosx,int mosy,int size){
	//我使用的字符是宽8*长16,so长要/2! 
	for(int i=0-size;i<=size;i++){
		bp[mosx+i][(int)(mosy+(sqrt(size*size-i*i))/2)].c='d';
		//bp[mosx+i][(int)(mosy+(sqrt(size*size-i*i))/2)].f=1;
		//bp[mosx+i][(int)(mosy+(sqrt(size*size-i*i))/2)].b=0;
		//gotoxy(mosx+i,mosy+(sqrt(size*size-i*i))/2);
		//clrtypb("d",1,0);
		
		bp[mosx+i][(int)(mosy-(sqrt(size*size-i*i))/2)].c='d';
		//bp[mosx+i][(int)(mosy-(sqrt(size*size-i*i))/2)].f=1;
		//bp[mosx+i][(int)(mosy-(sqrt(size*size-i*i))/2)].b=0;
		//gotoxy(mosx+i,mosy-(sqrt(size*size-i*i))/2);
		//clrtypb("d",1,0);
	}
}

void draw_circle(int mosx,int mosy,int size){
	for(int i=0-size;i<=size;i++){
		for(int j=mosy-(sqrt(size*size-i*i))/2;j<mosy+(sqrt(size*size-i*i))/2;j++){
			bp[i+mosx][j].c='d';
		}
	}
}
void meteor(int mosx,int mosy,int tims){//陨石 
  draw_halo(mosx,mosy,60);
  bp[mosx][mosy].c='x';
  bp[mosx+1][mosy].c='>';
  bp[mosx-1][mosy].c='<';
  bp[mosx][mosy+1].c='v';
  bp[mosx][mosy-1].c='^';
	if(tims==20) {
		circdmg(mosx,mosy,60,1000);
	}
}/*
int cstspl(int nm,int sx,int sy,int mosx,int mosy){
	if(spl[nm]==1) {
		thread mete(meteor,mosx,mosy);//这个thread有问题 
		//mete.join();
	}
	//if(spl[nm]==1) meteor(mosx,mosy);
}*/
void bord(){/*
	gotoxy(0,0);
	clrtyp("你的血量:",1);
	cout<<myhlt<<"  ";
	clrtyp("BOSS血量:",4);
	cout<<bshlt;
	gotoxy(0,60);
	clrtyp("技能1冷却:",1);*/
}
int exam(){//现在正在完成中 
  //初始化 
	myx=235,myy=58,bsx=117,bsy=30,myhlt=mhlt,mydmg=mdmg,myreg=mreg,mydfd=mdfd;
	bshlt=1000;
	int pa=0,sk1=0,sk2=0,sk3=0;
	sknm skn1,skn2,skn3;
	int epa=1,esk1,esk2,esk3;
	cp//237,61
	POINT p;
	//srand(time(NULL));
	queue<bul> bullets;
	while(1){
		//bul t0,t1,t2,t3;
		cp
		//bord();
		//BOSS部分 
		bp[bsx][bsy].c='B';
		bp[bsx+1][bsy].c='O';
		bp[bsx][bsy+1].c='S';
		bp[bsx+1][bsy+1].c='S';
		/*gotoxy(bsx,bsy);
		clrtyp("BO",4);
		gotoxy(bsx,bsy+1);
		clrtyp("SS",4);*/
		fmap[bsx][bsy]=0;
		//bsx+=(rand() % (3+3+1))+ -3;//-3到3 
		if(bsx<2) bsx=2;
		if(bsx>235) bsx=235;
		//srand(/*(unsigned)*/time(NULL));
		//bsy+=(rand() % (3+3+1))+ -3;//-3到3 
		if(bsy<2) bsy=2;
		if(bsy>59) bsy=59;
		fmap[bsx][bsy]=2;
		pmap();
		if(bshlt<=0) {
			win();
			return 0;
		}
		//if(_kbhit()) g=_getch();//飞舞 
		//if(KEY_DOWN(VK_LBUTTON)) {  			//鼠标部分鼠标左键按下
		//鼠标部分 
		GetCursorPos(&p);
		ScreenToClient(h,&p);               //获取鼠标在窗口上的位置
		GetCurrentConsoleFont(hOutput, FALSE, &consoleCurrentFont); //获取字体信息
		maosx=p.x/=consoleCurrentFont.dwFontSize.X;
		maosy=p.y/=consoleCurrentFont.dwFontSize.Y;
		bp[maosx][maosy].c='+';
		//Sleep(10);}
		//人物部分 
		fmap[myx][myy]=0;
		if(GetAsyncKeyState('W') & 0x8000) myy--; //可恶,被这四行卡了3天,别用getch! 
    if(GetAsyncKeyState('A') & 0x8000) myx-=2;
    if(GetAsyncKeyState('S') & 0x8000) myy++;
    if(GetAsyncKeyState('D') & 0x8000) myx+=2;
    if(myy<0) myy=0;
    if(myy>60) myy=60;
    if(myx<0) myx=0;
    if(myx>236) myx=236;
		fmap[myx][myy]=1;
    
  	/*if(GetAsyncKeyState(VK_SPACE) & 0x8000){
    	t0.sx=myx;
    	t0.sy=myy;
    	t0.ex=maosx;
    	t0.ey=maosy;
    	t0.nx=myx;
    	t0.ny=myy;
    	bullets.push(t0); 
		}*/
    if(GetAsyncKeyState('1') & 0x8000){
    	sk1=1;
    	skn1.stx=myx;
    	skn1.sty=myy;
    	skn1.endx=maosx;
    	skn1.endy=maosy;
    	//cstspl(1,myx,myy,maosx,maosy);
		}
		if(sk1){
			sk1++;
			meteor(skn1.endx,skn1.endy,sk1);
			if(sk1==20) sk1=0;
		}
		/*if(GetAsyncKeyState('2') & 0x8000){
    	
		}
		if(GetAsyncKeyState('3') & 0x8000){
    	
		}*/
		//if(GetAsyncKeyState(VK_SPACE)&0x8000) 
		//g=' ';
		//gotoxy(myx,myy);
		bp[myx][myy].c='Y';
		fmap[myx][myy]=1;
		if(myhlt<=0){
			lose();
			return 0;
		}
		Sleep(10);
	}
}
void dev(){
	myx=235,myy=58,bsx=117,bsy=30,myhlt=mhlt,mydmg=mdmg,myreg=mreg,mydfd=mdfd;
	bshlt=1000;
	int pa=0,sk1=0,sk2=0,sk3=0;
	sknm skn1,skn2,skn3;
	int epa=1,esk1,esk2,esk3;
	cp//237,61
	POINT p;
	srand(time(NULL));
	queue<bul> bullets;
	maosx=100;
	maosy=30;
	int photos=0;
	while(1){
		bul t0,t1,t2,t3;
		//cp
		//鼠标部分 
		GetCursorPos(&p);
		ScreenToClient(h,&p);               //获取鼠标在窗口上的位置
		GetCurrentConsoleFont(hOutput, FALSE, &consoleCurrentFont); //获取字体信息
		//gotoxy(maosx,maosy);
		//printf(" ");
		maosx=p.x/=consoleCurrentFont.dwFontSize.X;
		maosy=p.y/=consoleCurrentFont.dwFontSize.Y;
		//gotoxy(maosx,maosy);                        //移动光标置鼠标位置
		//bp[maosx][maosy].c='+';
		bp[maosx][maosy].c='+';
    if(GetAsyncKeyState('1') & 0x8000){
    	sk1=1;
    	skn1.stx=myx;
    	skn1.sty=myy;
    	skn1.endx=maosx;
    	skn1.endy=maosy;
    	//cstspl(1,myx,myy,maosx,maosy);
		}
		if(sk1){
			sk1++;
			meteor(skn1.endx,skn1.endy,sk1);
			if(sk1==100) sk1=0;
		}
		if(GetAsyncKeyState('2') & 0x8000){
			draw_halo(maosx,maosy,20);
    }
		if(GetAsyncKeyState('3') & 0x8000){
    	draw_circle(maosx,maosy,20);
		}
		//if(GetAsyncKeyState(VK_SPACE)&0x8000) 
		//g=' ';
		//gotoxy(myx,myy);
		//clrtyp("Y",6);
		//fmap[myx][myy]=1;
		photos++;
		bp[0][60].c='p';
		bp[1][60].c='h';
		bp[2][60].c='o';
		bp[3][60].c='t';
		bp[4][60].c='o';
		bp[photos%237][59].c='A';
		
		pmap();
		Sleep(10);
	}
}
void game(){
	cp
	if(grad==-1){
		slotyp("按 ",5);
		clrstypb("1",5,5,1); 
		slotyp(" 跳过剧情,\n按2观看剧情。",5);ce
		//slotyp("玩的时候小心不要按Caps Lock。",5);
		while(1){
			if(GetAsyncKeyState('2') & 0x8000){
				cp
				slotyp("一道",20); 
				clrstyp("红",20,4);
				slotyp("光闪过后,你掉到了一颗未知的星球上。" ,20);ce sl 
				slotyp("四周一片荒芜。。。" ,40);ce sl
				slotyp("你环视一周,不知道该做些什么。" ,80);ce sl
				slotyp("突然,你的面前闪过一个无比熟悉的东西:" ,30);ce cp
				Sleep(300) ;
				for(int i=0;i<80;i++) cout<<endl; 
				cout<<"有如下递归代码:"<<endl;
					Sleep(5);
				cout<<"solve(t,n);"<<endl;
					Sleep(15);
				cout<<"    if(t==1) return 1;"<<endl;
					Sleep(5);
				cout<<"    else return 5*solve(t-1,n) mod n;"<<endl;
					Sleep(5);
				cout<<"则solve(23,23)的结果为()?"<<endl;
					Sleep(5);
				for(int i=0;i<50;i++){
					cout<<endl;
					Sleep(10);
				}
				cp
				Sleep(500);
				slotyp("身为OIer的你马上就想起来这是2021年CSP-S的题目,并隐约记得答案是1。" ,30);ce sl 
				slotyp("你想起了你的OI生涯……",20);ce sl
				//slotyp("刹那间,你想起了那些年你努力拼搏,在考场上仔细答题,有欢笑,有泪水,最终……不都化为了一张张奖状,随着风,随着你的成长," ,60);ce
				//slotyp("飞向了远方……" ,60);ce sl
				slotyp("不对劲,CSP考题为什么会出现在这里???" ,5);ce sl
				slotyp("难道……      " ,200);  slotyp("我来到了IOI的世界?" ,5);ce sl sl
				slotyp("这时,一道压轴大模拟向你扑了过来!" ,1);
				sl cp
				HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
		 		SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | 4);
		 		//洛谷P8815 逻辑表达式 
				cout<<"题目描述"<<endl<<
				"逻辑表达式是计算机科学中的重要概念和工具,包含逻辑值、逻辑运算、逻辑运算优先级等内容。"<<endl cutcl <<
				"在一个逻辑表达式中,元素的值只有两种可能:"<<endl cutcl <<
				"0(表示假)和 1(表示真)。元素之间有多种可能的逻辑运算,"<<endl cutcl <<
				"本题中只需考虑如下两种:“与”(符号为 &)和“或”(符号为 |)。其运算规则如下:"<<endl cutcl <<
				"0&0=0&1=1&0=0,"<<endl cutcl <<
				"1&1=1;"<<endl cutcl <<
				"0∣0=0,"<<endl cutcl <<
				"0∣1=1∣0=1∣1=1。"<<endl cutcl <<
				"在一个逻辑表达式中还可能有括号。规定在运算时,括号内的部分先运算;"<<endl cutcl <<
				"两种运算并列时,& 运算优先于 | 运算;同种运算并列时,从左向右运算。"<<endl cutcl <<
				"比如,表达式 0|1&0 的运算顺序等同于 0|(1&0);表达式 0&1&0|1 的运算顺序等同于 ((0&1)&0)|1。"<<endl cutcl <<
				"此外,在 C++ 等语言的有些编译器中,对逻辑表达式的计算会采用一种“短路”的策略:"<<endl cutcl <<
				"在形如 a&b 的逻辑表达式中,会先计算 a 部分的值,如果 a=0,那么整个逻辑表达式的值就一定为 "<<endl cutcl <<
				"0,故无需再计算 b 部分的值;同理,在形如 a|b 的逻辑表达式中,会先计算 a 部分的值,如果 "<<endl cutcl <<
				"a=1,那么整个逻辑表达式的值就一定为 "<<endl cutcl <<
				"1,无需再计算 b 部分的值。"<<endl cutcl <<
				"现在给你一个逻辑表达式,你需要计算出它的值,并且统计出在计算过程中,两种类型的“短路”各出现了多少次。"<<endl cutcl <<
				"需要注意的是,如果某处“短路”包含在更外层被“短路”的部分内则不被统计。"<<endl cutcl <<
				"如表达式 1|(0&1) 中,尽管 0&1 是一处“短路”,但由于外层的 1|(0&1) 本身就是一处“短路”,"<<endl cutcl <<
				"无需再计算 0&1 部分的值,因此不应当把这里的 0&1 计入一处“短路”。"<<endl cutcl <<
				"输入格式"<<endl cutcl <<
				"输入共一行,一个非空字符串 s 表示待计算的逻辑表达式。"<<endl cutcl <<
				"输出格式"<<endl cutcl <<
				"输出共两行,第一行输出一个字符 0 或 1,表示这个逻辑表达式的值;"<<endl cutcl <<
				"第二行输出两个非负整数,分别表示计算上述逻辑表达式的过程中,形如 a&b 和 a|b 的“短路”各出现了多少次。" <<endl;
				sl sl cp
		 		SetConsoleTextAttribute(handle, FOREGROUND_INTENSITY | 7);
				clrstyp("呵呵,外星人;" ,20,4);ce sl 
				clrstyp("不自量力的陌生人;" ,20,4);ce sl
				clrstyp("诶? 不不不,我认识你,",20,4);ce sl
				clrstyp("你不是在2022考场上就被我吓到,",20,4);ce sl
				clrstyp("惨遭保龄,",20,4);ce sl
				clrstyp("无  缘  1=  了  吗?",100,4);ce ce sl 
				cout<<"你心想:"<<endl;
				clrstyp("呵呵,那个在CSP-J第二轮T4坑了我一次的模拟,",20,1);ce sl
				clrstyp("我早就在",20,1);
				slotyp("洛谷",30);
				clrstyp("修改代码过后A了你,",20,1);ce sl
				clrstyp("现在想再制裁我,",20,1);ce sl
				clrstyp("那可就难上加难了!",20,1);ce ce sl
				
				slotyp("士别三日,即更刮目相待,",20);
				clrstyp("大模拟",100,1);
				slotyp("何见事之晚乎?",20);ce sl
				slotyp("话音未落,你迅速打开",5);
				clrstyp("洛谷",30,5);
				slotyp(",掏出你早已订正好的代码,",5);ce sl
				slotyp("按下了Ctrl+c,",5);ce sl
				slotyp("将代码丢向这道大模拟!",5);
				clrstyp("一场大战,",5,0);
				clrstyp("一触",5,4);
				clrstyp("即发!",5,1);
				break;
			}
			if(GetAsyncKeyState('1') & 0x8000){
				break;
			}
		}
		exam(); 
		//if(g!='1')
		//	exam(); 
		//grad+=2; 
	}
}
int main(){
	/*spl[1]=1;
	mhlt=100;
	mdmg=10;
	mreg=2;
	mdfd=0;*/
  ios::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
	/*freopen("bcells.txt","r",stdin);
	freopen("bcells.txt","w",stdout);*/
	cout<<"现在就开全屏!NOW!"<<endl<<"然后按任意键开始游戏。"; 
	g=getch();
	cp
	while(1){
		for(int i=0;i<18;i++) cout<<endl;
		ioird();
		for(int i=0;i<20;i++) cout<<endl;
		//sl
		cout<<"                                                                                                                                                                                                                   按1存读档,按2开始游戏"<<endl;
		//g=getch();
		//switch(g){
		while(1){
			if(GetAsyncKeyState('1') & 0x8000){
				cp
				mm();
				break;
			}
			if(GetAsyncKeyState('2') & 0x8000){
				cp
				game(); 
				break;
			}
			if(GetAsyncKeyState('3') & 0x8000){
				dev(); 
				break;
			}
		}
	//} 
		sl cp
	}
	return 0;
}