phigros
  • 板块灌水区
  • 楼主binomial
  • 当前回复5
  • 已保存回复5
  • 发布时间2023/10/22 12:44
  • 上次更新2023/10/22 12:51:28
查看原帖
phigros
894358
binomial楼主2023/10/22 12:44

rt.(趁同学不在给他整个活)(别举报一会删)

#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
int jz,mcom=0;
void gotoxy(int x,int y){
 COORD coord; coord.X = x; coord.Y = y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); }
bool ax(int count, ...){
	va_list nVirtKey;
	va_start(nVirtKey, count);
	for(int i = 0; i < count; i++)
	if(!(GetKeyState(va_arg(nVirtKey, int)) & 0x8000))
	return false;
	return true;
}
struct Note {
	double startTime, endTime,lx,zt;
	int wz,dq=0;
	bool fuc=0;
	char ldx,ldy; 
}JudgeLine[101][5002];
bool zw[111111][27];
void gd(){
//	system("start Phigros Introduction.m4a");
	int len=0;
	while(1){
		Sleep(10);
		len++;
		if(len>100000){
			len=1;
		}
		for(int i=0;i<26;i++){
			if(ax(1,'A'+i)){
				zw[len][i]=1;
			}
		}
	}
}
bool pd(){
	for(int i=0;i<=100000;i++){
		if(!zw[i][jz]){
			return 1;
		}
	}
	return 0;
}
void xinshou(){
	thread tims(gd);
	int dy=0,P=0,G=0,M=0,dq=0,lj=0;
	while(1){
		gotoxy(0,0);
		Sleep(20);
		dy++;
		system("cls");
		for(int i=0;i<100;i++){
			if(JudgeLine[0][i].lx==3&&JudgeLine[0][i].endTime<=dy+4){
				if(JudgeLine[0][i].fuc==0){
					if(JudgeLine[0][i].dq==3){
						P++;
					}
					if(JudgeLine[0][i].dq==2){
						G++;
					}
					JudgeLine[0][i].zt=JudgeLine[0][i].dq;
					JudgeLine[0][i].fuc=1;
					lj++;
				}
			}
			if(JudgeLine[0][i].endTime<=dy-9&&JudgeLine[0][i].zt==0){
				M++;
				lj=0;
				JudgeLine[0][i].zt=1;
			}
			else if(JudgeLine[0][i].zt==2||JudgeLine[0][i].zt==3){
				JudgeLine[0][i].zt=1;
			}
			else if(JudgeLine[0][i].zt==1){
				continue;
			}
			else{
				dq=i;
				break;
			}
		}
		int yl=dq;
		for(int i=0;i<26;i++){
			jz=i;
			for(int j=0;j<100;j++){
				if(ax(1,i+'A')){
					if((JudgeLine[0][j].ldx==i+'A'||JudgeLine[0][j].ldy==i+'A')&&JudgeLine[0][j].zt==0){
						if(JudgeLine[0][j].lx==1){
							if(JudgeLine[0][j].startTime<=dy+2&&JudgeLine[0][j].startTime>=dy-2){
								P++;
								lj++;
								JudgeLine[0][j].zt=3;
							}
						}
						if(JudgeLine[0][j].lx==2){
							if(JudgeLine[0][j].startTime<=dy+2&&JudgeLine[0][j].startTime>=dy-2&&(ax(1,'Q')||ax(1,'W')||ax(1,'E')||ax(1,'R')||ax(1,'T')||ax(1,'Y')||ax(1,'U')||ax(1,'I')||ax(1,'O')||ax(1,'P'))){
								P++;
								lj++;
								JudgeLine[0][j].zt=3;
							}
						}
						if(JudgeLine[0][j].lx==0&&pd()){
							if(JudgeLine[0][j].startTime<=dy+3&&JudgeLine[0][j].startTime>=dy-3){
								P++;
								lj++;
								JudgeLine[0][j].zt=3;
							}
							else if(JudgeLine[0][j].startTime<=dy+5&&JudgeLine[0][j].startTime>=dy-5){
								G++;
								lj++;
								JudgeLine[0][j].zt=2;
							}
						}
						if(JudgeLine[0][j].lx==3&&pd()){
							if(JudgeLine[0][j].dq==0){
								if(JudgeLine[0][j].startTime<=dy+3&&JudgeLine[0][j].startTime>=dy-3){
									JudgeLine[0][j].dq=3;
								}
								else if(JudgeLine[0][j].startTime<=dy+5&&JudgeLine[0][j].startTime>=dy-5){
									JudgeLine[0][j].dq=2;
								}
								else if(JudgeLine[0][j].startTime<=dy-8){
									JudgeLine[0][j].zt=1;
									JudgeLine[0][j].fuc=1;
									JudgeLine[0][j].dq=1;
									M++;
								}
							}
						}
					}	
				}
				else if((JudgeLine[0][j].ldx==i+'A'||JudgeLine[0][j].ldy==i+'A')&&JudgeLine[0][j].lx==3){
					if(JudgeLine[0][j].endTime<=dy+4&&JudgeLine[0][j].fuc==0){
						M++;
						JudgeLine[0][j].fuc=1;
					}
				}
			}
		}
		cout<<"precept:"<<P<<"Good:"<<G<<"Miss or Bad:"<<M<<endl;
		for(int j=51;j>=-9;j--){
			mcom=max(mcom,lj);
			if(dy<=140){
				gotoxy(77,31);
				cout<<"<=================================>  这是Tap,在他到判定线时点击它对应的键。";
			}
			if(dy>=360&&dy<=570){
				gotoxy(75,31);
				cout<<"-----------------------------------  这是Drag,在他到判定线时保持按下它对应的键。";
			}
			if(dy>=880&&dy<=1130){
				gotoxy(61,31);
				cout<<"<================/\\/==============>  这是Flick,在他到判定线时保持按下它对应的键及保持按下键盘第一行的任意键。";
			}
			if(dy>=1280&&dy<=1360){
				gotoxy(75,31);
				cout<<"/------------------------------------\\  这是Hold,在他到判定线时点击它直到它消失。"<<endl;
				cout<<"                                                                           |                                    |"<<endl;
				cout<<"                                                                           |                                    |"<<endl;  
				cout<<"                                                                           |                                    |"<<endl;  
				cout<<"                                                                           \\------------------------------------/"<<endl;  
			}
			if(j==51&&lj>=3){
				int ls=lj,len=0;
				while(ls>=1){
					ls/=10;
					len++; 
				}
				gotoxy(118-(len-1)/2,1);
				cout<<lj;
				
			}
			if(j==51){
				gotoxy(228,1);
		//		cout<<P<<" "<<G<<" "<<mcom<<endl;
				int df=P*9*pow(10,5)*1.0/100+G*9*pow(10,5)*1.0/100*0.65+mcom*pow(10,5)*1.0/100;
				int ls=df,len=6;
				while(ls>=1){
					ls/=10;
					len--;
				}
				for(int k=1;k<=len;k++){
					cout<<" ";
				}
				cout<<df;
			}
			if(j==50&&lj>=3){
				gotoxy(114,2);
				cout<<"C O M B O";
				
			}
			if(j==0){
				gotoxy(0,52);
				cout<<"-------------------------a-------------------------s-------------------------d-------------------------f-------------------------h-------------------------j-------------------------k-------------------------l--------------------------"<<endl;
				continue;
			}
			for(int k=1;k<=234;k++){
				int bj=0;
				for(int i=dq;i<=min(dq+10,100);i++){ 
					if((JudgeLine[0][i].startTime-dy<=j&&JudgeLine[0][i].endTime-dy>=j)&&JudgeLine[0][i].wz==k&&JudgeLine[0][i].zt==0){
						
						if(j==JudgeLine[0][i].startTime-dy){
							if(JudgeLine[0][i].lx==1){
								gotoxy(k,52-j);
								cout<<"-----------------------------------";
							}
							if(JudgeLine[0][i].lx==0){
								gotoxy(k,52-j);
								cout<<"<=================================>";		
							}
							if(JudgeLine[0][i].lx==2){
								gotoxy(k,52-j);
								cout<<"<================/\\/================>";
							}
							if(j>=0&&JudgeLine[0][i].lx==3){
								gotoxy(k,52-j);
								cout<<"\\------------------------------------/";
							}
						}
						else if(j>=0&&j==JudgeLine[0][i].endTime-dy){
							gotoxy(k,52-j);
							cout<<"/------------------------------------\\";
						}
						else if(j>=0){
							gotoxy(k,52-j);
							cout<<"|                                    |";
						}
						k+=35;
					}
					if((JudgeLine[0][i].startTime-dy==j&&j==1)&&JudgeLine[0][i].wz==k&&JudgeLine[0][i].zt==3){
						gotoxy(k,52-j);
						cout<<"precept!";
					}
					if((JudgeLine[0][i].startTime-dy==j&&j==1)&&JudgeLine[0][i].wz==k&&JudgeLine[0][i].zt==2){
						gotoxy(k,52-j);
						cout<<"good!";
					}
				}
			}
		}
	}
}
void qidong(){
	for(int i=1;i<=30;i++){
		cout<<endl;
	}
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■■■■■■    ■             ■    ■■■■■■   ■■■■■■   ■        ■   ■■■■■■"<<endl;
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■        ■    ■                   ■        ■   ■        ■    ■      ■    ■"<<endl;
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■        ■    ■             ■    ■        ■   ■        ■     ■    ■     ■"<<endl;
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■        ■    ■             ■    ■        ■   ■        ■      ■  ■      ■"<<endl;
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■■■■■■    ■■■■■■   ■    ■■■■■■   ■        ■       ■■       ■■■■■■"<<endl;
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■              ■        ■   ■              ■   ■        ■        ■                  ■"<<endl;
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■              ■        ■   ■              ■   ■        ■        ■                  ■"<<endl;
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■              ■        ■   ■              ■   ■        ■        ■                  ■"<<endl;
	for(int i=1;i<=70;i++){
		cout<<" ";
	}
	cout<<"■              ■        ■   ■    ■■■■■■   ■■■■■■        ■        ■■■■■■"<<endl;
	for(int i=1;i<=108;i++){
		cout<<" ";
	}
	cout<<">>>单击q键以开始<<<";
	while(1){
		if(ax(1,'Q')){
			system("cls");
			xinshou();
			break;
		}
	} 
}
double fzt[1145]={10,14,18,18,32,32.5,33,33.5,34,37,37.5,38,38.5,39,42,42.5,42,42.5,60,62,64,72};
double zzt[1145]={10,14,18,18,32,32.5,33,33.5,34,37,37.5,38,38.5,39,42,42.5,42,42.5,60,62,64,73};
int lxt[1145]={0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,3};
char ldw[1145]={'F','F','D','J','F','F','F','F','F','J','J','J','J','J','D','D','J','J','F','F','F','F'};
char ldk[1145]={'1','1','1','1','1','1','H','H','H','1','1','1','1','1','1','1','1','1','1','1','1','1'};
int wzx[1145]={89,89,63,139,87,91,95,99,103,141,137,133,129,125,63,62,139,139,89,89,89,89};
int main(){
	system("mode con cols=234 lines=63");
	for(int i=0;i<100;i++){ 
		JudgeLine[0][i].startTime=fzt[i]*20;
		JudgeLine[0][i].endTime=zzt[i]*20;
		JudgeLine[0][i].zt=0;
		JudgeLine[0][i].lx=lxt[i];
		JudgeLine[0][i].wz=wzx[i];
		JudgeLine[0][i].ldx=ldw[i];
		JudgeLine[0][i].ldy=ldk[i];
	}
	qidong();
	return 0;
}
//234*63
//  A    S   D   F    H    J    K    L
//  11  37  63  89  115  141  167  193
//  46  72  98 124  150  176  202  228
//	-9  17  43  69   95  121  147  173
//  61  87 113 139  165  191  217  243
//234-78=154

2023/10/22 12:44
加载中...