真◇题解

黄戈  •  3个月前


#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#define KeyDown(VK) (GetAsyncKeyState(VK)&0x8000)?true:false
using namespace std;
void slowsay(const char*a,int speed=50){
	int alen=strlen(a);
	for(int i=0;i<alen;i++){
		_sleep(speed);
		cout<<a[i];
	}
}
void NoMenu()
{
	DeleteMenu(GetSystemMenu(GetForegroundWindow(),FALSE),SC_MAXIMIZE,MF_BYCOMMAND);
	DeleteMenu(GetSystemMenu(GetForegroundWindow(),FALSE),SC_SIZE,MF_BYCOMMAND);
	DeleteMenu(GetSystemMenu(GetForegroundWindow(),FALSE),SC_CLOSE,MF_BYCOMMAND);
	DrawMenuBar(GetForegroundWindow());
}
int main(){
	NoMenu();
	slowsay("#include<iostream>\nusing namespace std;\nint main(){\n  int a,b;\n  cin>>a>>b;\n  cout<<a+b;\n  return 0;\n}\n"); 
	cout<<"--------------------------------"<<endl;
	cout<<"Process exited after 1.676 seconds with return value 3221225477"<<endl;
	cout<<"请按任意键继续. . .";
	_sleep(2500);
	int t=300;
	while(t--){
		for(int i=7;i<=256;i++) if(KeyDown(i)) return 0;
		_sleep(1);
	}
	slowsay("不错不错,居然还在\n\n",50);
	slowsay("文字游戏,正式开始!!!",100);
	_sleep(5000);
	slowsay("你居然没退?\n");
	_sleep(500);
	slowsay("似乎你也退不了...",100);
	_sleep(5000);
	slowsay("傻逼,退吧,不然我直接shutdown /t制裁你!",100);
	_sleep(7500);
	slowsay("不错啊,作者认可你的耐力了!文字游戏,正式开始!created by xhanglingx...",75);
	_sleep(500);
	slowsay("好吧,这并不是文字游戏,但它是个题解库!仅需输入magicoj里的题号即可获取题解!!!",75);
	_sleep(500);
	system("cls");
	while(1){
		slowsay("傻*,请输入题号:",65);
		string a;
		cin>>a;
		string y="start http://magicoj.com/problem/discuss?id=";
		y+=a;
		int ylen=y.length();
		char b[114];
		for(int i=0;i<ylen;i++){
			b[i]=y[i];
		}
		slowsay("正在为你查找题目");
		slowsay("......\n",125);
		slowsay("正在查找题解");
		slowsay("......\n",125);
		slowsay("正在打开");
		slowsay("......\n",125);
		system(b);
		a="";
		ylen=0;
		for(int i=0;i<114;i++){
			b[i]=' ';
		}
	}
	return 0;
}

评论: