#include<bits/stdc++.h>
using namespace std;
int main(){
	string m;
	int i=100;
	while(i>0){
		system("color C0");
		cout<<"-"<<m.size();
		_sleep(50);
		system("cls");
		system("color 7F");
		_sleep(10);
		cout<<"欢迎来到金山打字通(打完按回车)"<<i<<endl<<"ASDFGHJKL;"<<endl;
		cin>>m;
		system("cls");
		i-=m.size();
	}
	//第一形态 
	i=100;
	while(i>0){
		system("color 40");
		cout<<"-1";
		_sleep(50);
		system("cls");
		system("color 1F");
		_sleep(10);
		cout<<"欢迎来到金山打字通(打完按回车)"<<i<<endl<<"A;SLDKFJGH"<<endl;
		cin>>m;
		system("cls");
		i--;
	}
	//第二形态 
	system("color 20");
	cout<<"你赢了!";
	_sleep(1000);
	system("cls");
	cout<<"你赢了";
	_sleep(50);
	cout<<"吗";
	_sleep(50);
	cout<<"?";
	_sleep(100);
	i=30; 
	int x,c=0;
	while(i>0){
		if(c){
			system("color 20");
			cout<<"+1";
		}else{
			system("color 40");
			cout<<"-1";
		}
		_sleep(50);
		system("cls");
		system("color 5F");
		_sleep(10);
		x=rand()%11;
		cout<<"欢迎来到金山打字通(打完按回车)"<<i<<endl<<"GHFJDKSLA;"<<endl<<"打字个数"<<x<<endl;
		cin>>m;
		if(m.size()==x){
			system("cls");
			i--;
			c=0;
		}else{
			system("cls");
			i++;
			c=1;
		}
	}
	system("color 40");
	system("cls");
	//第三形态 
	int b=0;
	while(b<3){
		_sleep(500);
		system("cls");
		b++;
		cout<<b<<"%";
	}
	for(int i=3;i<100;i++){
		system("cls");
		cout<<i<<"%";
	}
	_sleep(2000);
	system("cls");
	b=100;
	cout<<b<<"%";
	i=10;
	while(i>0){
		if(c){
			system("color 20");
			cout<<"+10";
		}else{
			system("color 40");
			cout<<"-1";
		}
		_sleep(50);
		system("cls");
		system("color 54");
		_sleep(10);
		x=rand()%11;
		cout<<"欢迎来到金山打字通(打完按回车)"<<i<<endl<<"ASDFGHJKL;"<<endl<<"打字个数"<<x<<endl;
		cin>>m;
		if(m.size()==x){
			system("cls");
			i--;
			c=0;
		}else{
			if(x==0){
				i--;
				c=0;
			} 
			else{
				system("cls");
				i+=10;
				c=1;	
			}
		}
	}
	//第四形态 
	system("color 9F");
	cout<<"!"; 
	_sleep(100);
	cout<<"!"; 
	_sleep(100);
	cout<<"!"; 
	_sleep(100);
	cout<<"高"; 
	_sleep(100);
	cout<<"能"; 
	_sleep(100);
	cout<<"预"; 
	_sleep(100);
	cout<<"警"; 
	_sleep(100);
	cout<<"!"; 
	_sleep(100);
	cout<<"!"; 
	_sleep(100);
	cout<<"!"; 
	_sleep(1000);
	i=20;
	while(i>0){
		system("color 40");
		cout<<"-1";
		_sleep(50);
		system("cls");
		system("color 45");
		_sleep(10);
		x=rand()%11;
		cout<<"欢迎来到金山打字通(打完按回车)"<<i<<endl<<";LKJHGFDSA"<<endl<<"打字个数"<<x<<endl;
		cin>>m;
		if(m.size()==x){
			system("cls");
			i--;
			c=0;
		}else{
			if(x==0){
				i--;
				c=0;
			} 
			else{
				system("cls");
				system("color 47");
				cout<<"你输了!"; 
				return 0; 
			}
		}
	}
	
	//过关 
	system("color 20");
	cout<<"你赢了!"; 
	return 0;
}