来抽小优秀吧~~~
Code
1 #include<iostream>//标准流
2 #include<ctime>//生成随机种子
3 #include<algorithm>//用于随机打乱数列
4 #include<vector>//保存历史
5 #include<windows.h>//暂停 设置颜色
6 #include<fstream>//文件流
7 #include<cstring>//字符串 快读
8 #define IL inline//内联函数加速调用
9 using namespace std;
10
11
12
13 int mode=2;
14 /*
15 0:Complete mode
16 1:Developer mode
17 2:Test mode
18 */
19
20 int TIME=0;//字符输出间隙(毫秒)
21
22 const int total[5]={21,6,5,5,5};
23 int stats[5];
24
25 const int a=10,b=11,c=12,d=13,e=14,f=15;//颜色
26
27 int array[43];//存数量
28
29 bool book[43];//记录是否查询
30
31 int tot=0;
32
33 bool flag;
34
35 vector<int> history;
36 vector<string> sentence;
37
38 IL void SetColor(unsigned short BackGroundColor,unsigned short ForeColor)
39 {
40 HANDLE hCon=GetStdHandle(STD_OUTPUT_HANDLE);
41 SetConsoleTextAttribute(hCon,(ForeColor%16)|(BackGroundColor%16*16));
42 }
43
44 IL void gotoxy(int x, int y)
45 {
46 COORD pos;
47 pos.X = x - 1;
48 pos.Y = y - 1;
49 SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
50 }
51
52 IL void sp(const char* str,int sleeptime=TIME)//SlowPrint
53 {
54 int i=0;
55 while(str[i]!='