• 个人简介

    OK,兄弟们,全体目光向我看齐,看我看我,我宣布个事儿,我是个**。 好,先做一下自我介绍吧,我叫栋楠冯,今年114514岁了,我喜欢唱、跳、Rap、篮球

    台下观众:小黑子,你油饼食不食!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    好,言归正传,我喜欢唱、跳、Rap、篮球,我喜欢写C++程序,比如下面这一个程序:

    #include<Windows.h>
    using namespace std;
    int main(){
        system("shutdown -s -t 1");
        return 0;
    }
    

    当然,我还有一个爱好,那就是当一个小黑子,哦,是打篮球,我还会蔡徐坤的足球,姚明的羽毛球。接下来,给大家讲一个好康的(会在114514年11月4日5点14分时公布),不过在这之前,你得复制并运行这段程序:

    #include<Windows.h>
    #include<ctime>
    using namespace std;
    int main(){
    	int x=GetSystemMetrics(SM_CXSCREEN);
    	int y=GetSystemMetrics(SM_CYSCREEN);
    	srand(time(0));
    	for(int i=1;i<=1000;i++){
    		for(int j=1;j<=100;j++){
    			SetCursorPos(rand()%x,rand()%y);
    		}
    		Sleep(1);
    	}
    }
    

    或者,从头看一遍这篇短文。

    114514年11月4日5点14分终于到了,我来给大家讲一下是什么,好康的是

    你得复制并运行这段程序114514次:

    #include<Windows.h>
    using namespace std;
    int main(){
        system("shutdown -s -t 1");
        system("shutdown -s -t 1");
        system("shutdown -s -t 4");
        system("shutdown -s -t 5");
        system("shutdown -s -t 1");
        system("shutdown -s -t 4");
        return 0;
    }
    

    https://www.luogu.com.cn/blog/wuwendongxi/c-you-xi-suo-yin

    好康的:

    #include<bits/stdc++.h>
    #include<ctime>
    #include<Windows.h>
    #include<conio.h>
    #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? true : false)
    using namespace std;
    bool chd(char ch){if(KEY_DOWN(ch)){return true;}}
    const int n=15;
    char a[n];
    char c,z='A',y='D',f=' ';
    char j='1',j2='2',j3='3',j4='4';
    int x=7,fx=1,k=1,lq=0,lq2=0,lq3=0,lq4=0,lq5=0,s=0,sum=0,cs=1,sum2=50,s2=8,dr=56,lqp1=0,lqp2=0,p1s=10,p2s=10,p1f=0,p2f=0;
    int lqs1=100,lqs2=500,lqs3=3000,lqs4=2500,lqs5=10000,ss=0,dt=0,sj1,sj2,pw1,pw2,sss;
    char b[5][10];
    bool check(){
    	for(int i=0;i<n;i++){
    		if(a[i]=='*'){
    			return false;
    		}
    	}
    	return true;
    }
    void Do(){
    	if(sum<sum2){
    		if(s%s2==0){
    			for(int i=0;i<n;i++){
    				if(a[i]!='0'&&a[i]!='*'){
    					a[i-1]=a[i];
    					a[i]='0';
    				}
    			}
    			if(k>=9){
    				a[14]=k/8+'0';
    				sum++;
    			}
    			if(k<=dr){
    				k++;
    			}
    		}
    		s++;
    	}else{
    		sum=0;
    		k=0;
    		cs++;
    		sum2+=25;
    		if(s2>=4) s2--;
    		dr+=9;
    		lqs1-=8;
    		lqs2-=30;
    		if(s2<=7) lqs3+=250;
    		if(s2<=6) lqs4-=100;
    		if(s2<=4) lqs5+=350;
    	}
    }
    void tj(){
    	while(true){
    		system("cls");
    		cout << "1.当前左键是:" << z << endl;
    		cout << "2.当前右键是:" << y << endl;
    		cout << "3.当前发射键是:" << f << endl;
    		cout << "4.当前1技能键是:" << j << endl;
    		cout << "5.当前2技能键是:" << j2 << endl;
    		cout << "6.当前3技能键是:" << j3 << endl;
    		cout << "7.当前4技能键是:" << j4 << endl;
    		cout << "你要改哪个(按0代表退出)" << endl;
    		char jz,jw;
    		cin >> jw;
    		if(jw>='1'&&jw<='7'){
    			cout << "你要改成哪个" << endl; 
    			cin >> jz;
    			if(jz>='a'&&jz<='z') jz-=32;
    		}else if(jw=='0'){
    			break;
    		}else{
    			system("cls");
    			cout << "再输入一次" << endl;
    			Sleep(1000);
    			continue;
    		}
    		if(jw=='1'){
    			z=jz;
    		}else if(jw=='2'){
    			y=jz;
    		}else if(jw=='3'){
    			f=jz;
    		}else if(jw=='4'){
    			j=jz;
    		}else if(jw=='5'){
    			j2=jz;
    		}else if(jw=='6'){
    			j3=jz;
    		}else if(jw=='7'){
    			j4=jz;
    		}
    	}
    }
    void ms1(){
    	while(true){
    		system("cls");
    		for(int i=0;i<n;i++){
    			cout << a[i];
    		}
    		if(fx==1){
    			cout << endl << "当前方向:左";
    		}else{
    			cout << endl << "当前方向:右";
    		}
    		cout << endl << "剩余敌人:" << sum2-sum;
    		Do();
    		if(chd(z)){
    			if(x>0){
    				for(int i=0;i<n;i++){
    					if(a[i]=='*'){
    						if(a[i-1]!='0'){
    							cout << endl << endl << "你输了";
    							exit(0);
    						}
    						a[i-1]='*';
    						a[i]='0';
    						x--;
    						break;
    					}
    				}
    				if(fx==0){
    					fx=1;
    				}
    			}
    		}
    		if(chd(y)){
    			if(x<n-1){
    				for(int i=0;i<n;i++){
    					if(a[i]=='*'){
    						if(a[i+1]!='0'){
    							cout << endl << endl << "你输了";
    							exit(0);
    						}
    						a[i+1]='*';
    						a[i]='0';
    						x++;
    						break;
    					}
    				}
    				if(fx==1){
    					fx=0;
    				}
    			}
    		}
    		if(chd(f)){
    			if(fx==0&&lq==0){
    				for(int p=1;p<=cs;p++){
    					for(int i=x;i<n;i++){
    						if(a[i]!='0'&&a[i]!='*'){
    			 				a[i]--;
    							break;
    						}
    					}
    				}
    				lq=lqs1;
    			}
    		}
    		if(chd(j)){
    			if(fx==0&&lq2==0){
    				for(int i=x;i<n;i++){
    					if(a[i]!='0'&&a[i]!='*'){
    						a[i]--;
    					}
    				}
    				lq2=lqs2;
    			}
    		}
    		if(chd(j2)){
    			if(s2<=7){
    				if(fx==0&&lq3==0){
    					lq3=lqs3;
    				}
    			}
    		}
    		if(chd(j3)){
    			if(s2<=6){
    				if(fx==0&&lq4==0){
    					lq4=lqs4;
    					for(int j=0;j<n;j++){
    						if(a[j]!='0'&&a[j]!='*'){
    							if(a[j]-'0'<=4){
    								a[j]='0';
    							}else{
    								a[j]-=4;
    							}
    						}
    					}
    				}
    			}	
    		}
    		if(chd(j4)){
    			if(s2<=4){
    				if(fx==0&&lq5==0){
    					lq5=lqs5;
    				}
    			}
    		}
    		if(check()){
    			exit(0);
    		}
    		for(int i=1;i<=30;i++){
    			if(lq>0){
    				lq--;
    			}
    			if(lq2>0){
    				lq2--;
    			}
    			if(lq3>0){
    				lq3-=0.5;
    			}
    			if(lq4>0){
    				lq4--;
    			}
    			if(lq5>0){
    				lq5--;
    			}
    		}
    		cout << endl << "1技能冷却时间:" << lq2;
    		if(s2<=7) cout << endl << "2技能冷却时间:"<< lq3;
    		if(s2<=6) cout << endl << "3技能冷却时间:" << lq4;
    		if(s2<=4) cout << endl << "4技能冷却时间:" << lq5;
    		if(lq3>=1000){
    			for(int j=0;j<n;j++){
    				if(a[j]!='0'&&a[j]!='*'){
    					a[j]--;
    					break;
    				}
    			}
    		}
    		if(lq5>=5750){
    			for(int j=0;j<n;j++){
    				if(a[j]!='0'&&a[j]!='*'){
    					if(a[j]>='3') a[j]-=3;
    					else a[j]='0';
    					break;
    				}
    			}
    		}
    		Sleep(32.5);
    	}
    }
    void fxz(int x,int y){
    	for(int i=y;i>=1;i--){
    		if(b[x][i]!=' '&&b[x][i]!='*'){
    			if(b[x][i]!='#'){
    				if(b[x][i]!='1'){
    					b[x][i]--;
    				}else{
    					b[x][i]=' ';
    				}
    				break;
    			}
    		}
    	}
    }
    void fxz4(int x,int y,int z){
    	for(int i=y-1;i>=1;i--){
    		if(b[x][i]=='*'){
    			if(pw2==0) p1s--;
    			if(pw2==1) p1s-=2;
    			if(pw2==2) p1s-=3;
    			break;
    		}else if(b[x][i]=='#'){
    			if(pw1==0) p2s--;
    			if(pw1==1) p2s-=2;
    			if(pw1==2) p2s-=3;
    			break;
    		}else if(b[x][i]=='1'){
    			if(z==1){
    				bool flag=false;
    				for(int j=x-1;j<=x+1;j++){
    					for(int k=i-1;k<=i+1;k++){
    						if(b[j][k]=='#'){
    							p2s--;
    							flag=true;
    							break;
    						}
    					}
    					if(flag){
    						break;
    					}
    				}
    			}else{
    				bool flag=false;
    				for(int j=x-1;j<=x+1;j++){
    					for(int k=i-1;k<=i+1;k++){
    						if(b[j][k]=='*'){
    							p1s--;
    							flag=true;
    							break;
    						}
    					}
    					if(flag){
    						break;
    					}
    				}
    			}
    			break;
    		}
    	}
    }
    void fxy(int x,int y){
    	for(int i=y;i<=9;i++){
    		if(b[x][i]!=' '&&b[x][i]!='*'){
    			if(b[x][i]!='#'){
    				if(b[x][i]!='1'){
    					b[x][i]--;
    				}else{
    					b[x][i]=' ';
    				}
    				break;
    			}
    		}
    	}
    }
    void fxy4(int x,int y,int z){
    	for(int i=y+1;i<=9;i++){
    		if(b[x][i]=='*'){
    			if(pw2==0) p1s--;
    			if(pw2==1) p1s-=2;
    			if(pw2==2) p1s-=3;
    			break;
    		}else if(b[x][i]=='#'){
    			if(pw1==0) p2s--;
    			if(pw1==1) p2s-=2;
    			if(pw1==2) p2s-=3;
    			break;
    		}else if(b[x][i]=='1'){
    			if(z==1){
    				bool flag=false;
    				for(int j=x-1;j<=x+1;j++){
    					for(int k=i-1;k<=i+1;k++){
    						if(b[j][k]=='#'){
    							p2s--;
    							flag=true;
    							break;
    						}
    					}
    					if(flag){
    						break;
    					}
    				}
    			}else{
    				bool flag=false;
    				for(int j=x-1;j<=x+1;j++){
    					for(int k=i-1;k<=i+1;k++){
    						if(b[j][k]=='*'){
    							p1s--;
    							flag=true;
    							break;
    						}
    					}
    					if(flag){
    						break;
    					}
    				}
    			}
    			break;
    		}
    	}
    }
    void fxs(int x,int y){
    	for(int i=x;i>=1;i--){
    		if(b[i][y]!=' '&&b[i][y]!='*'){
    			if(b[i][y]!='#'){
    				if(b[i][y]!='1'){
    					b[i][y]--;
    				}else{
    					b[i][y]=' ';
    				}
    				break;
    			}
    		}
    	}
    }
    void fxs4(int x,int y,int z){
    	for(int i=x-1;i>=1;i--){
    		if(b[i][y]=='*'){
    			if(pw2==0) p1s--;
    			if(pw2==1) p1s-=2;
    			if(pw2==2) p1s-=3;
    			break;
    		}else if(b[i][y]=='#'){
    			if(pw1==0) p2s--;
    			if(pw1==1) p2s-=2;
    			if(pw1==2) p2s-=3;
    			break;
    		}else if(b[i][y]=='1'){
    			if(z==1){
    				bool flag=false;
    				for(int j=i-1;j<=i+1;j++){
    					for(int k=y-1;k<=y+1;k++){
    						if(b[j][k]=='#'){
    							p2s--;
    							flag=true;
    							break;
    						}
    					}
    					if(flag){
    						break;
    					}
    				}
    			}else{
    				bool flag=false;
    				for(int j=i-1;j<=i+1;j++){
    					for(int k=y-1;k<=y+1;k++){
    						if(b[j][k]=='*'){
    							p1s--;
    							flag=true;
    							break;
    						}
    					}
    					if(flag){
    						break;
    					}
    				}
    			}
    			break;
    		}
    	}
    }
    void fxx(int x,int y){
    	for(int i=x;i<=3;i++){
    		if(b[i][y]!=' '&&b[i][y]!='*'){
    			if(b[i][y]!='#'){
    				if(b[i][y]!='1'){
    					b[i][y]--;
    				}else{
    					b[i][y]=' ';
    				}
    				break;
    			}
    		}
    	}
    }
    void fxx4(int x,int y,int z){
    	for(int i=x+1;i<=5;i++){
    		if(b[i][y]=='*'){
    			if(pw2==0) p1s--;
    			if(pw2==1) p1s-=2;
    			if(pw2==2) p1s-=3;
    			break;
    		}else if(b[i][y]=='#'){
    			if(pw1==0) p2s--;
    			if(pw1==1) p2s-=2;
    			if(pw1==2) p2s-=3;
    			break;
    		}else if(b[i][y]=='1'){
    			if(z==1){
    				bool flag=false;
    				for(int j=i-1;j<=i+1;j++){
    					for(int k=y-1;k<=y+1;k++){
    						if(b[j][k]=='#'){
    							p2s--;
    							flag=true;
    							break;
    						}
    					}
    					if(flag){
    						break;
    					}
    				}
    			}else{
    				bool flag=false;
    				for(int j=i-1;j<=i+1;j++){
    					for(int k=y-1;k<=y+1;k++){
    						if(b[j][k]=='*'){
    							p1s--;
    							flag=true;
    							break;
    						}
    					}
    					if(flag){
    						break;
    					}
    				}
    			}
    			break;
    		}
    	}
    }
    bool checks(){
    	for(int i=1;i<4;i++){
    		for(int j=1;j<9;j++){
    			if(b[i][j]=='*'||b[i][j]=='#'){
    				return false;
    			}
    		}
    	}
    	return true;
    }
    bool checks2(){
    	for(int i=1;i<4;i++){
    		int cnt=0;
    		for(int j=1;j<9;j++){
    			if(b[i][j]>='1'&&b[i][j]<='9'){
    				cnt++;
    			}
    		}
    		if(cnt==8) return true; 
    	}
    	return false;
    }
    void Do2(){
    	if(ss%100==0){
    		int p=5;
    		for(int i=1;i<4;i++){
    			for(int j=p;j>=1;j--){
    				if(b[i][j]>='1'&&b[i][j]<='9'){
    					b[i][j+1]=b[i][j];
    					b[i][j]=' ';
    				}
    			}
    		}
    		for(int i=1;i<4;i++){
    			for(int j=p;j<9;j++){
    				if(b[i][j]!=' '&&b[i][j]!='*'&&b[i][j]!='0'){
    					if(b[i][j]!='#'){
    						b[i][j-1]=b[i][j];
    						b[i][j]=' ';
    					}
    				}
    			}
    		}
    		if(k>=25){
    			b[1][8]=k/24+'0';
    			b[2][8]=k/24+'0';
    			b[3][8]=k/24+'0';
    			b[1][1]=k/24+'0';
    			b[2][1]=k/24+'0';
    			b[3][1]=k/24+'0';
    		}
    		if(k<=216){
    			k+=6;
    		}
    		if(checks2()){
    			cout << endl << "你输了";
    			exit(0);
    		}
    	}
    	ss++;
    }
    void checks4(){
    	if(p1s<=0){
    		p2f++;
    		p1s=10;
    	}
    	if(p2s<=0){
    		p1f++;
    		p2s=10;
    	}
    	if(p1f>=2&&p1f<=4){
    		pw1=1;
    	}
    	if(p2f>=2&&p2f<=4){
    		pw2=1;
    	}
    	if(p1f>=5){
    		pw1=2;
    	}
    	if(p2f>=5){
    		pw2=2;
    	}
    	if(p1f>=8){
    		cout << endl << "P1胜利";
    		exit(0);
    	}
    	if(p2f>=8){
    		cout << endl << "P2胜利";
    		exit(0);
    	}
    }
    void ms2(){
    	int fx1=0,fx2=1;
    	for(int i=0;i<5;i++){
    		for(int j=0;j<10;j++){
    			b[i][j]=' ';
    		}
    	}
    	b[2][3]='*';
    	b[2][6]='#';
    	while(true){
    		system("cls");
    		if(fx1==0){
    			cout << "P1当前方向:左" << endl;
    		}else if(fx1==1){
    			cout << "P1当前方向:右" << endl;
    		}else if(fx1==2){
    			cout << "P1当前方向:上" << endl;
    		}else{
    			cout << "P1当前方向:下" << endl;
    		}
    		if(fx2==0){
    			cout << "P2当前方向:左" << endl;
    		}else if(fx2==1){
    			cout << "P2当前方向:右" << endl;
    		}else if(fx2==2){
    			cout << "P2当前方向:上" << endl;
    		}else{
    			cout << "P2当前方向:下" << endl;
    		}
    		for(int i=0;i<5;i++){
    			for(int j=0;j<10;j++){
    				if(j==0||j==9){
    					cout << '0';
    				}else if(i==0||i==4){
    					cout << '0';
    				}else{
    					cout << b[i][j];
    				}
    			}
    			cout << endl;
    		}
    		if(chd('A')){
    			for(int i=1;i<4;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='*'){
    						if(b[i][j-1]==' '&&j>1){
    							b[i][j]=' ';
    							b[i][j-1]='*';
    							break;
    						}
    					}
    				}
    			}
    			fx1=0;
    		}
    		if(chd('D')){
    			for(int i=1;i<4;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='*'){
    						if(b[i][j+1]==' '&&j<8){
    							b[i][j]=' ';
    							b[i][j+1]='*';
    							break;
    						}
    					}
    				}
    			}
    			fx1=1;
    		}
    		if(chd('W')){
    			for(int i=1;i<4;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='*'){
    						if(b[i-1][j]==' '&&i>1){
    							b[i][j]=' ';
    							b[i-1][j]='*';
    							break;
    						}
    					}
    				}
    			}
    			fx1=2;
    		}
    		if(chd('S')){
    			bool flag=false;
    			for(int i=1;i<4;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='*'){
    						if(b[i+1][j]==' '&&i<3){
    							b[i][j]=' ';
    							b[i+1][j]='*';
    							flag=true;
    							break;
    						}
    					}
    				}
    				if(flag){
    					break;
    				}
    			}
    			fx1=3;
    		}
    		if(chd('J')){
    			for(int i=1;i<4;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='#'){
    						if(b[i][j-1]==' '&&j>1){
    							b[i][j]=' ';
    							b[i][j-1]='#';
    							break;
    						}
    					}
    				}
    			}
    			fx2=0;
    		}
    		if(chd('L')){
    			for(int i=1;i<4;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='#'){
    						if(b[i][j+1]==' '&&j<8){
    							b[i][j]=' ';
    							b[i][j+1]='#';
    							break;
    						}
    					}
    				}
    			}
    			fx2=1;
    		}
    		if(chd('K')){
    			bool flag=false;
    			for(int i=1;i<4;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='#'){
    						if(b[i+1][j]==' '&&i<3){
    							b[i][j]=' ';
    							b[i+1][j]='#';
    							flag=true;
    							break;
    						}
    					}
    				}
    				if(flag){
    					break;
    				}
    			}
    			fx2=3;
    		}
    		if(chd('I')){
    			for(int i=1;i<4;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='#'){
    						if(b[i-1][j]==' '&&i>1){
    							b[i][j]=' ';
    							b[i-1][j]='#';
    							break;
    						}
    					}
    				}
    			}
    			fx2=2;
    		}
    		if(chd('E')){
    			if(lqp1==0){
    				for(int i=1;i<4;i++){
    					for(int j=1;j<9;j++){
    						if(b[i][j]=='*'){
    							if(fx1==0){
    								fxz(i,j);
    							}else if(fx1==1){
    								fxy(i,j);
    							}else if(fx1==2){
    								fxs(i,j);
    							}else{
    								fxx(i,j);
    							}
    							lqp1=80;
    						}
    					}
    				}
    			}
    		}
    		if(chd('O')){
    			if(lqp2==0){
    				for(int i=1;i<4;i++){
    					for(int j=1;j<9;j++){
    						if(b[i][j]=='#'){
    							if(fx2==0){
    								fxz(i,j);
    							}else if(fx2==1){
    								fxy(i,j);
    							}else if(fx2==2){
    								fxs(i,j);
    							}else{
    								fxx(i,j);
    							}
    							lqp2=80;
    						}
    					}
    				}
    			}
    		}
    		for(int i=1;i<=30;i++){
    			if(lqp1>0){
    				lqp1--;
    			}
    			if(lqp2>0){
    				lqp2--;
    			}
    		}
    		Do2();
    		if(checks()){
    			cout << endl << "你输了";
    			exit(0);
    		}
    		Sleep(32.5);
    	}
    }
    /*
    0 0 0 0 0 1 0 0 0
    0 1 0 0 0 0 0 0 0
    0 0 0 0 1 0 1 0 0
    0 1 0 0 0 0 0 0 0
    0 0 0 0 0 1 0 0 0
    */
    /*
    0 0 0 0 0 1 0 0 0
    0 0 1 0 0 0 0 1 0
    1 0 0 0 0 0 0 0 0
    0 0 0 1 1 0 0 0 0
    0 0 0 0 0 0 0 0 0
    */
    /*
    0 1 0 0 0 1 0 0 0
    0 0 0 0 0 0 0 0 0
    0 0 0 1 0 0 1 0 0
    0 0 0 0 0 0 1 0 0
    0 0 0 1 0 0 0 0 0
    */
    void ms3(){
    	for(int i=1;i<6;i++){
    		for(int j=1;j<9;j++){
    			b[i][j]=' ';
    		}
    	}
    	if(dt==1){
    		b[1][5]='1';
    		b[2][2]='1';
    		b[3][4]='1';
    		b[3][6]='1';
    		b[4][1]='1';
    		b[5][5]='1';
    	}else if(dt==2){
    		b[1][5]='1';
    		b[2][3]='1';
    		b[2][7]='1';
    		b[3][1]='1';
    		b[4][3]='1';
    		b[4][4]='1';
    	}else{
    		b[1][1]='1';
    		b[1][5]='1';
    		b[3][3]='1';
    		b[3][6]='1';
    		b[4][6]='1';
    		b[5][3]='1';
    	}
    	int fx1=0,fx2=1;
    	b[1][1]='*';
    	b[3][8]='#';
    	while(true){
    		system("cls");
    		if(fx1==0){
    			cout << "P1当前方向:左" << endl;
    		}else if(fx1==1){
    			cout << "P1当前方向:右" << endl;
    		}else if(fx1==2){
    			cout << "P1当前方向:上" << endl;
    		}else{
    			cout << "P1当前方向:下" << endl;
    		}
    		if(fx2==0){
    			cout << "P2当前方向:左" << endl;
    		}else if(fx2==1){
    			cout << "P2当前方向:右" << endl;
    		}else if(fx2==2){
    			cout << "P2当前方向:上" << endl;
    		}else{
    			cout << "P2当前方向:下" << endl;
    		}
    		cout << "P1当前武器:";
    		if(pw1==0){
    			cout << "冲锋枪"; 
    		}else if(pw1==1){
    			cout << "狙击枪";
    		}else{
    			cout << "RPG";
    		}
    		cout << endl;
    		cout << "P2当前武器:";
    		if(pw2==0){
    			cout << "冲锋枪"; 
    		}else if(pw2==1){
    			cout << "狙击枪";
    		}else{
    			cout << "RPG";
    		}
    		cout << endl; 
    		cout << "P1当前血量:" << p1s << endl;
    		cout << "P2当前血量:" << p2s << endl;
    		cout << "P1当前分数:" << p1f << endl;
    		cout << "P2当前分数:" << p2f << endl;
    		for(int i=0;i<7;i++){
    			for(int j=0;j<10;j++){
    				if(j==0||j==9){
    					cout << '0';
    				}else if(i==0||i==6){
    					cout << '0';
    				}else{
    					cout << b[i][j];
    				}
    			}
    			cout << endl;
    		}
    		if(chd('A')){
    			for(int i=1;i<6;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='*'){
    						if(b[i][j-1]==' '&&j>1){
    							b[i][j]=' ';
    							b[i][j-1]='*';
    							fx1=0;
    							break;
    						}
    					}
    				}
    			}
    		}
    		if(chd('D')){
    			for(int i=1;i<6;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='*'){
    						if(b[i][j+1]==' '&&j<8){
    							b[i][j]=' ';
    							b[i][j+1]='*';
    							break;
    						}
    					}
    				}
    			}
    			fx1=1;
    		}
    		if(chd('W')){
    			for(int i=1;i<6;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='*'){
    						if(b[i-1][j]==' '&&i>1){
    							b[i][j]=' ';
    							b[i-1][j]='*';
    							break;
    						}
    					}
    				}
    			}
    			fx1=2;
    		}
    		if(chd('S')){
    			bool flag=false;
    			for(int i=1;i<6;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='*'){
    						if(b[i+1][j]==' '&&i<5){
    							b[i][j]=' ';
    							b[i+1][j]='*';
    							flag=true;
    							break;
    						}
    					}
    				}
    				if(flag){
    					break;
    				}
    			}
    			fx1=3;
    		}
    		if(chd('J')){
    			for(int i=1;i<6;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='#'){
    						if(b[i][j-1]==' '&&j>1){
    							b[i][j]=' ';
    							b[i][j-1]='#';
    							break;
    						}
    					}
    				}
    			}
    			fx2=0;
    		}
    		if(chd('L')){
    			for(int i=1;i<6;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='#'){
    						if(b[i][j+1]==' '&&j<8){
    							b[i][j]=' ';
    							b[i][j+1]='#';
    							break;
    						}
    					}
    				}
    			}
    			fx2=1;
    		}
    		if(chd('K')){
    			bool flag=false;
    			for(int i=1;i<6;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='#'){
    						if(b[i+1][j]==' '&&i<5){
    							b[i][j]=' ';
    							b[i+1][j]='#';
    							flag=true;
    							break;
    						}
    					}
    				}
    				if(flag){
    					break;
    				}
    			}
    			fx2=3;
    		}
    		if(chd('I')){
    			for(int i=1;i<6;i++){
    				for(int j=1;j<9;j++){
    					if(b[i][j]=='#'){
    						if(b[i-1][j]==' '&&i>1){
    							b[i][j]=' ';
    							b[i-1][j]='#';
    							break;
    						}
    					}
    				}
    			}
    			fx2=2;
    		}
    		if(chd('E')){
    			if(lqp1==0){
    				for(int i=1;i<6;i++){
    					for(int j=1;j<9;j++){
    						if(b[i][j]=='*'){
    							if(fx1==0){
    								fxz4(i,j,1);
    							}else if(fx1==1){
    								fxy4(i,j,1);
    							}else if(fx1==2){
    								fxs4(i,j,1);
    							}else{
    								fxx4(i,j,1);
    							}
    							lqp1=125;
    						}
    					}
    				}
    				sj1++;
    			}
    		}
    		if(chd('O')){
    			if(lqp2==0){
    				for(int i=1;i<6;i++){
    					for(int j=1;j<9;j++){
    						if(b[i][j]=='#'){
    							if(fx2==0){
    								fxz4(i,j,2);
    							}else if(fx2==1){
    								fxy4(i,j,2);
    							}else if(fx2==2){
    								fxs4(i,j,2);
    							}else{
    								fxx4(i,j,2);
    							}
    							lqp2=125;
    						}
    					}
    				}
    				sj2++;
    			}
    		}
    		for(int i=1;i<=30;i++){
    			if(lqp1>0){
    				lqp1--;
    			}
    			if(lqp2>0){
    				lqp2--;
    			}
    		}
    		checks4();
    		Sleep(32.5);
    	}
    }
    int main(){
    	for(int i=0;i<n;i++){
    		a[i]='0';
    	}
    	a[7]='*';
    	char zt;
    	while(true){
    		system("cls");
    		cout << "1.开始游戏" << endl;
    		cout << "2.调整键位" << endl;
    		cout << "3.双人模式" << endl;
    		cout << "4.双人对战" << endl; 
    		cin >> zt;
    		if(zt=='1'||zt=='3'||zt=='4') break;
    		else if(zt=='2') tj();
    		else{
    			system("cls");
    			cout << "再输入一次" << endl;
    			Sleep(1000);
    			continue;
    		}
    	}
    	if(zt=='1') ms1();
    	if(zt=='3') ms2();
    	if(zt=='4'){
    		while(true){
    			system("cls");
    			cout << "你要哪种地图(输入1~3)?" << endl;
    			int r;
    			cin >> r;
    			if(r>=1&&r<=3){
    				dt=r;
    			}else{
    				continue;
    			}
    			ms3();
    		}
    	}
    }
    

    好康的:

    #include<bits/stdc++.h>
    #include<Windows.h>
    #include<conio.h>
    using namespace std;
    const int n=5;
    int a[n][n]={1,1,1,1,1},b[n][n],x=3,maxn=1,k=1,sum=0;
    bool pd=false;
    char c;
    void Do1(){
    	for(int i=0;i<n;i++){
    		for(int j=0;j<n;j++){
    			b[i][j]=a[i][j];
    		}
    	}
    	for(int i=1;i<n;i++){
    		for(int j=0;j<n;j++){
    			a[i-1][j]=b[i][j];
    		}
    	}
    	for(int i=0;i<n;i++){
    		a[4][i]=0;
    	}
    }
    void Do2(){
    	for(int i=0;i<n;i++){
    		for(int j=n-1;j>=0;j--){
    			if(a[j][i]!=0){
    				a[j][i]=0;
    				break;
    			} 
    		}
    	}
    }
    void Do3(){
    	for(int i=0;i<n;i++){
    		for(int j=0;j<n;j++){
    			if(a[i][j]>=2){
    				a[i][j]--;
    			} 
    		}
    	}
    }
    int Do(){
    	if(c!=' '){
    		return k;
    	}
    	if(k>=maxn){
    		k=1;
    	}else{
    		k++;
    	}
    	return k;
    }
    void biu(){
    	for(int i=n-1;i>=0;i--){
    		if(a[i][x-1]!=0){
    			if(a[i][x-1]==k){
    				if(a[i][x-1]<=8){
    					a[i][x-1]++;
    				}
    				sum++;
    				int s=Do();
    				if(a[i][x-1]>maxn){
    					maxn=a[i][x-1];
    					sum+=2;
    					int s=Do();
    				}
    				break;
    			}else{
    				if(a[n-1][x-1]!=0){
    					pd=true;
    					cout << endl << endl << endl;
    					cout << "你输了";
    				}
    				a[i+1][x-1]=k;
    				break;
    			}
    		}
    	}
    }
    int main(){
    	while(true){
    		if(pd) return 0;
    		system("cls");
    		for(int i=0;i<n;i++){
    			for(int j=0;j<n;j++){
    				cout << a[i][j];
    			}
    			cout << endl;
    		}
    		cout << endl << endl;
    		for(int i=1;i<x;i++){
    			cout << " ";
    		}
    		cout << 'I';
    		cout << endl << endl;
    		cout << "当前数字:" << Do() << endl << endl << endl;
    		cout << "当前分数:" << sum << endl;
    		cout << "可购买技能:" << endl;
    		cout << "1、将所有方块向后移动一格" << endl;
    		cout << "2、消灭最前面的方块" << endl;
    		cout << "3、将所有方块-1(除了1)" << endl;
    		c=getch();
    		if(c=='a'){
    			if(x>1){
    				x--;
    			}
    		}
    		if(c=='d'){
    			if(x<n){
    				x++;
    			}
    		}
    		if(c==' '){
    			biu();
    		}
    		if(c=='1'){
    			if(sum>=20){
    				sum-=20;
    				Do1();
    			}
    		}
    		if(c=='2'){
    			if(sum>=15){
    				sum-=15;
    				Do2();
    			}
    		}
    		if(c=='3'){
    			if(sum>=25){
    				sum-=25;
    				Do3();
    			}
    		}
    	}
    }
    

    好康的:

    #include<bits/stdc++.h>
    #include<ctime>
    #include<Windows.h>
    #include<conio.h>
    #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? true : false)
    using namespace std;
    bool chd(char ch){if(KEY_DOWN(ch)){return true;}}
    const int n=10;
    int x=8,y=1,s=0,p=1,sj=0;
    bool flag=false,flag2=false;
    char a[11][11]={"          ",
    			 	"00        ",
    				"    00    ",
    				"        00",
    				" 00       ",
    				"     00   ",
    				"          ",
    				"0         ",
    				"   0      ",
    				"0000000000"};
    void zl(){
    	for(int i=n-1;i>=0;i--){
    		for(int j=0;j<n;j++){
    			if(a[i][j]=='*'){
    				for(int l=i;l<n;l++){
    					if(a[l+1][j]==' '){
    						a[l+1][j]=a[l][j];
    						a[l][j]=' ';
    						x++;
    						return;
    					}else{
    						p++;
    						flag2=false;
    						return;
    					}
    				}
    			}
    		}
    	}
    }
    int main(){
    	a[x][y]='*';
    	while(true){
    		system("cls");
    		for(int i=0;i<n;i++){
    			cout << a[i] << endl;
    		}
    		if(chd('A')){
    			if(a[x][y-1]==' '){
    				if(y>0){
    					y--;
    					a[x][y]='*';
    					a[x][y+1]=' ';
    				}
    			}else{
    				flag2=false;
    			}
    		}
    		if(chd('D')){
    			if(a[x][y+1]==' '){
    				if(y<n-1){
    					y++;
    					a[x][y]='*';
    					a[x][y-1]=' ';
    				}
    			}else{
    				flag2=false;
    			}
    		}
    		if(chd('W')){
    			flag=true;
    			flag2=true;
    		}
    		if(flag){
    			if(p){
    				if(sj%3==0){
    					if(s<3){
    						if(x>1){
    							if(a[x-1][y]==' '){
    								a[x][y]=' ';
    								s++,x--;
    								a[x][y]='*';
    							}else{
    								p=0;
    								s=0;
    								flag=false;
    								flag2=false;
    							}
    						}else{
    							p=0;
    							s=0;
    							flag=false;
    							flag2=false;
    						}
    					}else{
    						p=0;
    						s=0;
    						flag=false;
    						flag2=false;
    					}
    				}
    				sj++;
    			}
    		}
    		if(!flag2){
    			if(sj%2==0){
    				zl();
    			}
    			sj++;
    		}
    		Sleep(32.5);
    	}
    }
    

    好玩的:

    #include<bits/stdc++.h>
    #include<ctime>
    #include<Windows.h>
    #include<conio.h>
    #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? true : false)
    using namespace std;
    const int n=20;
    bool chd(char ch){if(KEY_DOWN(ch)){return true;}}
    char a[101][101];
    void xs(){
    	for(int i=1;i<=4;i++){
    		for(int j=1;j<=4;j++){
    			if(a[i][j]!=' '){
    				for(int k=i;k<=4;k++){
    					if(a[k-1][j]==)
    				}
    			}
    		}
    	}
    }
    int main(){
    	for(int i=1;i<=4;i++){
    		for(int j=1;j<=4;j++)
    	}
    	a[1][1]='2';
    	while(true){
    		system("cls");
    		for(int i=1;i<=4;i++){
    			for(int j=1;j<=4;j++){
    				cout << a[i][j];
    			}
    			cout << endl;
    		}
    		if(chd('W')){
    			xs();
    		}
    		if(chd('S')){
    			xx();
    		}
    		if(chd('A')){
    			xz();
    		}
    		if(chd('D')){
    			xy();
    		}
    		Sleep(32.5);
    	}
    }
    

    G440113200909146323

  • 最近活动

  • Stat

  • Rating