-
个人简介
小游戏
//超级迷宫 #include <bits/stdc++.h> #include <windows.h> #include <conio.h> using namespace std; void Color(int a) { if (a == 0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN |FOREGROUND_BLUE); if (a == 1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_BLUE); if (a == 2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_GREEN); if (a == 3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_BLUE); if (a == 4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED); if (a == 5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN); if (a == 7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED |FOREGROUND_BLUE | FOREGROUND_GREEN); if (a == 8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | BACKGROUND_RED); } void Setpos(int x,int y) { COORD pos; pos.X = y * 2,pos.Y = x; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos); } int R[5]; void SlowDisplay(int x,char *p) { while (1) { if (*p != 0) { printf("%c",*p++); } else { break; } Sleep(x); } } struct xg { int xgx,xgy; bool fx,sw = 0; }xg[21]; int ys = 0,hd = 0,sj = 0,sl = 0,mg = 0,hp = 0,hss = 0,hsx = 0,jt = 0,s = 0; char ch[35][35]; char ch1[35][35] = {"", " ##### ##### ########"," #&## ### ### "," #### # ## #### #### "," ### ## # ####! ## "," ###& ### +## ###### ####"," ######&############! ##"," # *# ! ######### ###-##"," # ### ##### # "," # ###*# ############### ### "," # ###&### ####"," # # # ##-############## "," ###### #####! "," #+ # ###### ############ ", " ##&########## ### ### ### ## "," # ! ! #"," ############################"," # ! # ! # #"," # ! # ! #### "," #&########################### "," ) ",}; char ch2[35][35] = {""," ##############################"," #* #"," ########&###################-#"," # # #"," # # ################&#####-# #"," # # # ! +# # #"," # # # ##&############### # # #"," # # # # # # # #"," # # # # ###########&## # # # #"," # # # # #)- ! # # # & #"," # # # # ### ! # # # # #", " # # # ##########&####### # # #"," # # # ! # #"," # # ##################&##### #"," # # ! *# #"," # #####&####### ############ #"," # ! # # ! #"," # ############# ########### #"," # ! #"," ##############################", }; char ch3[31][33] = {""," ##############################"," #. + .#"," # ! #"," # + ! #"," # #"," # ! + #"," # ! + ! #"," # + #"," # + ! #", " # + ! #"," # ! + #"," #+ _____ #"," # |_ _ _| + #"," # + |_|||_| #"," # + |MMMMM| !#"," # |WWWWW| #"," #! |_____| #"," # ! #"," #. + .#"," ##############################", }; char ch4[35][35] = {""," ###*### ########"," ###! # ##### # *#"," ###&#+####### # # # # ######"," # !# # #-# # # # #"," ###&####### # # # # ## #"," ####### ##### # ## #"," ####&### ! ! !# ## #"," # ################ ## #"," ### !! ## "," #### ##&##################### "," # ! !# "," #-############&######### #&## "," #-#ooooooooooo o # #*## "," o ooo o o o o ooo # #### "," o o o o oo o o # "," ooo o ooooooo oo ooo o #######"," ooo o o o oo o #"," ooo o o o*oooooooooooooooo-#"," ooooooo o oo o o o o #"," ) o o o o o #",}; char ch5[35][35] = {""," oooo oooooooooooooooooooo"," ooo o oo+oo o o"," ooooooo*oooo ! o ! o o o"," o o o o o o o"," oooooooooo ooooooooooooooooo o"," o ! ! o"," oooooooo ooooooooooooooooooooo"," oooooooo ooooooooooooooooooooo", " o ! o"," o^^^^^^^^^^^^^^^^^^^^^^^^^^^^o"," o ! ! ! ! ! o"," o^^^^^^^^^^^^^^^^^^^^^^^^^^^^o"," o^*^! !^! !^! ^^! +^! !^! *^o"," o^^^^^^^^^^^^^^^^^^^^^^^^^^^^o"," o ! ! ! ! ! o"," #^^^^^^^^^^^^^^^^^^^^^^^^^^^^#"," # ! #"," ####oooooooooo--oooooooooooo##"," ########oooooo--ooooooo#######"," ###########ooo))oooo##########", }; char ch6[35][35] = {""," oooooooooooooo .oooooooooooooo"," o+oooooooooooo oooooooooooo+o"," ooooooooooooo# #ooooooooooooo"," oooooooooooo#^^^^#oooooooooooo"," oooo*oooooo#^ ^#oooooo*oooo"," oooooooooo# ^ ^ #oooooooooo"," ooooooooo# ^ ^ #ooooooooo"," oooooooo#^^^^^^^^^^^^#oooooooo"," ooooooo#^ ^#--#^ ^#ooooooo"," . ^ ^-NO-^ ^ "," ^ ^-IP-^ ^ ."," ooooooo#^ ^#--#^ ^#ooooooo"," oooooooo#^^^^^^^^^^^^#oooooooo"," ooooooooo# ^ ^ #ooooooooo"," oooooooooo# ^ ^ #oooooooooo"," oooo*oooooo#^ ^#oooooo*oooo"," oooooooooooo#^^^^#oooooooooooo"," ooooooooooooo# #ooooooooooooo"," o+oooooooooooo oooooooooooo+o"," oooooooooooooo. oooooooooooooo",}; void map1(int x,int y,int k) { for (int i = 1;i <= 20;++i) for (int j = 1;j <= 30;++j) { bool f = 1; for (int l = 1;l <= k;++l) if (xg[l].xgx == i && xg[l].xgy == j && xg[l].sw == 0) { Setpos(i,j); Color(4),cout << "▼";f = 0; break; } if (f == 1) { Setpos(i,j); if (i == x && j == y) Color(1),cout << "●"; else if (ch[i][j] == '#' || ch[i][j] == '&') Color(7),cout << "■"; else if (ch[i][j] == ')') Color(5),cout << "☆"; else if (ch[i][j] == '*') Color(5),cout << "♂"; else if (ch[i][j] == '-') Color(3),cout << "▋"; else if (ch[i][j] == '+') Color(2),cout << "◆"; else if (ch[i][j] == '.') Color(1),cout << "◆"; else if (ch[i][j] == 'o') Color(8),cout << "~ "; else if (ch[i][j] == '_') Color(3),cout << "▁"; else if (ch[i][j] == '^') Color(3),cout << "▲"; else if (ch[i][j] == '|') Color(3),cout << "|"; else if (ch[i][j] == 'M') Color(3),cout << 'M' << 'M'; else if (ch[i][j] == 'W') Color(3),cout << 'W' << 'W'; else if (ch[i][j] == 'N') Color(2),cout << "NO"; else if (ch[i][j] == 'I') Color(2),cout << ".."; else if (ch[i][j] == 'O') Color(2),cout << "I!"; else if (ch[i][j] == 'P') Color(2),cout << ".P"; else Color(0),cout << " "; } } Setpos(21,3); Color(5),cout << "[" << ys << " ♂] ",Color(2),cout << "[" << hd << " ◆]"; } int yx(int a) { int k = 0,T = 0,x,y,boss = 0,win = 0;ys = 0,hd = 0,sj = 0; system("cls"); if(a==1) {for(int i=0;i<35;i++)for(int j=0;j<35;j++) ch[i][j]=ch1[i][j];x=1,y=1;} if(a==2) {for(int i=0;i<35;i++)for(int j=0;j<35;j++) ch[i][j]=ch2[i][j];x=2,y=29;} if(a==3) {for(int i=0;i<35;i++)for(int j=0;j<35;j++) ch[i][j]=ch3[i][j];x=10,y=15;boss=1;} if(a==4) {for(int i=0;i<35;i++)for(int j=0;j<35;j++) ch[i][j]=ch4[i][j];x=1,y=1;} if(a==5) {for(int i=0;i<35;i++)for(int j=0;j<35;j++) ch[i][j]=ch5[i][j];x=1,y=1;} if(a==6) {for(int i=0;i<35;i++)for(int j=0;j<35;j++) ch[i][j]=ch6[i][j];x=1,y=15;boss=2;} if(boss==1){for (int i=1;i<=200;++i) {int xx=rand()%21,yy=rand()%31;if ((xx!=x||yy!=y)&&ch[xx][yy]!='_'&&ch[xx][yy]!='W'&&ch[xx][yy]!='|'&&ch[xx][yy]!='M'&&ch[xx][yy]!='.') ch[xx][yy]='o';}map1(x,y,k);} for(int i=1;i<35;++i)for(int j=1;j<35;++j) if (ch[i][j]=='!')k++,xg[k].xgx=i,xg[k].xgy=j,ch[i][j]=' '; map1(x,y,k); while (1) { T++; Setpos(x,y),cout<<" "; if(GetAsyncKeyState(VK_UP)&0x8000&&x!=1&&ch[x-1][y]!='#') x--; else if(GetAsyncKeyState(VK_DOWN)&0x8000&&x!=20&&ch[x+1][y]!='#') x++; else if(GetAsyncKeyState(VK_LEFT)&0x8000&&y!=1&&ch[x][y-1]!='#') y--; else if(GetAsyncKeyState(VK_RIGHT)&0x8000&&y!=30&&ch[x][y+1]!='#') y++; Setpos(x,y),Color(1),cout<<"●"; if(boss!=0&&T%20==5){ for (int i=1;i<=20;++i)for (int j=1;j<=30;++j)if (ch[i][j]=='o') ch[i][j]=' '; for (int i=1;i<=200*boss;++i) {int xx=rand()%21,yy=rand()%31;if ((xx!=x||yy!=y)&&ch[xx][yy]==' ') ch[xx][yy]='o';} map1(x,y,k);} if(T%20==0) map1(x,y,k);if(T%20==10){for(int i=1;i<35;++i)for(int j=1;j<35;++j) if(ch[i][j]=='^')Setpos(i,j),cout<<" ";} if(T%4==0&&k!=0) for (int i=1;i<=k;i++){ if (xg[i].fx==0&&(ch[xg[i].xgx][xg[i].xgy+1]==' '||(ch[xg[i].xgx][xg[i].xgy-1]=='^'&&T%20>=10))&&xg[i].xgy!=30) Setpos(xg[i].xgx,xg[i].xgy),cout<<" ",xg[i].xgy++,Setpos(xg[i].xgx,xg[i].xgy),Color(4),cout<<"▼"; else if (xg[i].fx==1&&(ch[xg[i].xgx][xg[i].xgy-1]==' '||(ch[xg[i].xgx][xg[i].xgy-1]=='^'&&T%20>=10))&&xg[i].xgy!=1) Setpos(xg[i].xgx,xg[i].xgy),cout<<" ",xg[i].xgy--,Setpos(xg[i].xgx,xg[i].xgy),Color(4),cout<<"▼"; else if (xg[i].fx==1) xg[i].fx=0;else xg[i].fx=1;} for (int i=1;i<=k;i++){ if (xg[i].xgx==x&&xg[i].xgy==y&&xg[i].sw==0&&hd==0) {system("cls");cout<<"怪物啊!!!";Sleep(2000);system("cls");return 0;} else if (xg[i].xgx==x&&xg[i].xgy==y&&hd>0&&xg[i].sw==0) {system("cls");cout<<"护盾保护了你!";Sleep(1000);system("cls");map1(x,y,k);hd--;xg[i].sw=1;}} if (ch[x][y]==')') {system("cls");cout<<"You Win!";Sleep(2000);system("cls");win=1;} if (ch[x][y]=='*') {system("cls");cout<<"你找到了钥匙!";ys++;Sleep(1000);system("cls");map1(x,y,k);ch[x][y]=' ';} if (ch[x][y]=='.') {system("cls");cout<<"你破坏了水晶!";sj++;Sleep(1000);system("cls");map1(x,y,k);ch[x][y]=' ';} if (ch[x][y]=='-'&&ys>0) {system("cls");cout<<"门开了!";ys--;Sleep(1000);system("cls");map1(x,y,k);ch[x][y]=' ';}else if (ch[x][y]=='-') {system("cls");cout<<"你没有钥匙!";--x;Sleep(3000);system("cls");map1(x,y,k);} if (ch[x][y]=='+') {system("cls");cout<<"你找到了护盾!";hd++;Sleep(1000);system("cls");map1(x,y,k);ch[x][y]=' ';} if (ch[x][y]=='o'&&hd==0) {system("cls");cout<<"烫死啦!!!";Sleep(2000);return 0;} else if (hd>0&&ch[x][y]=='o') {system("cls");cout<<"护盾保护了你!";ch[x][y]=' ';hd--;Sleep(1000);system("cls");map1(x,y,k);} if (ch[x][y]=='^'&&T%20<10&&hd==0) {system("cls");cout<<"被刺穿啦!!!";Sleep(2000);return 0;} else if (hd>0&&ch[x][y]=='^'&&T%20<10) {system("cls");cout<<"护盾保护了你!";ch[x][y]=' ';hd--;Sleep(1000);system("cls");map1(x,y,k);} if ((a==3||a==6)&&sj==4) {system("cls");cout<<"你過關! 你过关!";Sleep(2000);system("cls");win=1;} for (int i=1;i<=k;i++) if (xg[i].xgx==x&&xg[i].xgy==y&&xg[i].sw==0&&hd==0) {system("cls");cout<<"怪物啊!!!";Sleep(1000);system("cls");return 0;} else if (xg[i].xgx==x&&xg[i].xgy==y&&hd>0&&xg[i].sw==0) {system("cls");cout<<"护盾保护了你!";Sleep(1000);system("cls");map1(x,y,k);map1(x,y,k);hd--;xg[i].sw=1;} if(win==1){if(a==1)sl=1;if(a==2)mg=1;if(a==3)hp=1;if(a==4)hss=1;if(a==5)hsx=1;return 0;} Sleep(100); } } void ml(){while(1){ system("cls");Color(0); cout<<"1、迷雾森林 ";cout<<endl; if (sl==0) cout<<"2、 ? ? ? ? ";else cout<<"2、巨石迷宫(图中如果走可穿透墙,能避开所有的怪) "; cout<<endl; if (mg==0) cout<<"3、 ? ? ? ? ";else cout<<"3、熔岩喷泉(BOSS,图中随机出现熔岩) ";cout<<endl; if (hp==0) cout<<"4、 ? ? ? ? ";else cout<<"4、火山口(上) ";cout<<endl; if (hss==0) cout<<"5、 ? ? ? ? ";else cout<<"5、火山口(下) ";cout<<endl; if (hsx==0) cout<<"6、 ? ? ? ? ";else cout<<"6、火山祭坛(BOSS)";cout<<endl; cout<<"选择关卡(序号)"<<endl;cout<<"退出输入0"<<endl; int a;cin>>a; if (a==1) {yx(1);}if (a==2&&sl==1){yx(2);}if (a==3&&mg==1) {yx(3);}if (a==4&&hp==1) {yx(4);}if (a==5&&hss==1){yx(5);}if (a==6&&hsx==1){yx(6);}if (a==0) cout << "再见!" << endl;return; }} void gz() { system("cls"); cout<<"由上下左右键控制"<<endl; cout<<"●是你"<<endl; cout<<"■是墙"<<endl; cout<<"☆是终点"<<endl; cout<<"▼是小怪(只会左右移动)"<<endl; cout<<"▋是门"<<endl; cout<<"♂是钥匙"<<endl; cout<<"◆是护盾(不可杀怪)"<<endl; cout<<"■是可穿透墙(每一关几乎都有)"<<endl; cout<<"◆是水晶(BOSS关破坏所有水晶通关)"<<endl; cout<<"~ 是熔岩"<<endl; cout<<"▁是尖刺(未升起)"<<endl; cout<<"▲是尖刺(升起)"<<endl; cout<<"输入1开始!"<<endl; int a; cin>>a; if (a==1) ml(); else gz(); } int main(){ CONSOLE_CURSOR_INFO cursor_info={1,0};SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);srand((unsigned)time(NULL)); cout<<"欢迎来到超级迷宫!"<<endl;cout<<"1、开始!"<<endl;cout<<"2、规则..."<<endl; int a;cin>>a;if (a==1){system("cls");ml();}else if (a==2){gz();} return 0; }
#include <bits/stdc++.h> #include <sys/types.h> #include <sys/stat.h> using namespace std; int qian,a[11],b[11],c,d,e,f,l,i_; string filename = "c++彩票模拟器的钱.txt",s = ""; bool l1,l2,l3,l4,l5,l6,l7; int main(){ srand(time(NULL)); if(!access(filename.c_str(), F_OK) == 0){ qian = 100; ofstream file("c++彩票模拟器的钱.txt"); file << qian; file.close(); } ifstream inputFile("c++彩票模拟器的钱.txt"); getline(inputFile,s); qian = atoi(s.c_str()); inputFile.close(); cout << "欢迎来到彩票模拟器,你要玩还是不玩。(你初始有100彩元,每张彩票2元)(玩就输入1,不玩输就入0)\n"; cin >> l; if(l >= 1){ while(1){ cout << "你想买多少张彩票。\n"; cin >> f; if(f > 1){ while(qian < 2 * f){ cout << "你买不起" << f << "张彩票,请重新输入\n"; cin >> f; } qian -= 2 * f; } else if(f == 1) qian -= 2; else if(f <= 0){ while(f <= 0){ cout << "请重新输入。\n"; cin >> f; if(f > 1){ while(qian < 2 * f){ cout << "你买不起" << f << "张彩票,请重新输入\n"; cin >> f; } qian -= 2 * f; } else if(f == 1) qian -= 2; } } else{ cout << "你不够钱了,你猜到我手中有多少彩元,那么我手中的彩元归你。(我手中有50~100彩元)\n"; d = rand() % 51 + 50; cout << "现在开始猜吧。\n"; while(1){ cin >> e; if(d > e) cout << "小了。\n"; else if(d < e) cout << "大了。\n"; else{ cout << "猜对了,恭喜你获得了" << d << "彩元。\n"; qian += d; break; } } } for(i_ = 1 ; i_ <= f ; i_++){ cout << "第" << i_ << "张彩票。\n"; cout << "请输入选5个从01~35的号码。\n"; for(int i = 1 ; i <= 5 ; i++) cin >> a[i]; cout << "请输入选2个从01~12的号码。\n"; for(int i = 6 ; i <= 7 ; i++) cin >> a[i]; for(int i = 1 ; i <= 5 ; i++) b[i] = rand() % 35 + 1; for(int i = 6 ; i <= 7 ; i++) b[i] = rand() % 12 + 1; l1 = a[1] == b[1]; l2 = a[2] == b[2]; l3 = a[3] == b[3]; l4 = a[4] == b[4]; l5 = a[5] == b[5]; l6 = a[6] == b[6]; l7 = a[7] == b[7]; if(l1 && l2 && l3 && l4 && l5 && l6 && l7){ c = (rand() % 501 + 500) * 10000; cout << "恭喜你中了一等奖,获得奖金" << c << "彩元。\n"; qian += c; } else if((l1 && l2 && l3 && l4 && l5) && (l6 || l7)){ c = (rand() % 5 + 1) * 100000; cout << "恭喜你中了二等奖,获得奖金" << c << "彩元。\n"; qian += c; } else if(l1 && l2 && l3 && l4 && l5){ cout << "恭喜你中了三等奖,获得奖金10000彩元。\n"; qian += 10000; } else if(((l1 && l2 && l3 && l4) || (l1 && l2 && l3 && l5) || (l1 && l2 && l4 && l5) || (l1 && l3 && l4 && l5) || (l2 && l3 && l4 && l5)) && (l6 && l7)){ cout << "恭喜你中了四等奖,获得奖金3000彩元。\n"; qian += 3000; } else if(((l1 && l2 && l3 && l4) || (l1 && l2 && l3 && l5) || (l1 && l2 && l4 && l5) || (l1 && l3 && l4 && l5) || (l2 && l3 && l4 && l5)) && (l6 || l7)){ cout << "恭喜你中了五等奖,获得奖金300彩元。\n"; qian += 300; } else if(((l1 && l2 && l3) || (l1 && l2 && l4) || (l1 && l2 && l5) || (l1 && l3 && l4) || (l1 && l3 && l5) || (l1 && l4 && l5) || (l2 && l3 && l4) || (l2 && l3 && l5) || (l2 && l4 && l5) || (l3 && l4 && l5)) && (l6 && l7)){ cout << "恭喜你中了六等奖,获得奖金200彩元。\n"; qian += 200; } else if((l1 && l2 && l3 && l4) || (l1 && l2 && l3 && l5) || (l1 && l2 && l4 && l5) || (l1 && l3 && l4 && l5) || (l2 && l3 && l4 && l5)){ cout << "恭喜你中了七等奖,获得奖金100彩元。\n"; qian += 100; } else if(((l1 && l2 && l3) || (l1 && l2 && l4) || (l1 && l2 && l5) || (l1 && l3 && l4) || (l1 && l3 && l5) || (l1 && l4 && l5) || (l2 && l3 && l4) || (l2 && l3 && l5) || (l2 && l4 && l5) || (l3 && l4 && l5)) && (l6 || l7)){ cout << "恭喜你中了八等奖,获得奖金15彩元。\n"; qian += 15; } else if(((l1 && l2) || (l1 && l3) || (l1 && l4) || (l1 && l5) || (l2 && l3) || (l2 && l4) || (l2 && l5) || (l3 && l4) || (l3 && l5) || (l4 && l5)) && (l6 && l7)){ cout << "恭喜你中了八等奖,获得奖金15彩元。\n"; qian += 15; } else if((l1 && l2 && l3) || (l1 && l2 && l4) || (l1 && l2 && l5) || (l1 && l3 && l4) || (l1 && l3 && l5) || (l1 && l4 && l5) || (l2 && l3 && l4) || (l2 && l3 && l5) || (l2 && l4 && l5) || (l3 && l4 && l5)){ cout << "恭喜你中了九等奖,获得奖金5彩元。\n"; qian += 5; } else if(((l1 && l2) || (l1 && l3) || (l1 && l4) || (l1 && l5) || (l2 && l3) || (l2 && l4) || (l2 && l5) || (l3 && l4) || (l3 && l5) || (l4 && l5)) && (l6 || l7)){ cout << "恭喜你中了九等奖,获得奖金5彩元。\n"; qian += 5; } else if((l1 || l2 || l3 || l4 || l5) && (l6 && l7)){ cout << "恭喜你中了九等奖,获得奖金5彩元。\n"; qian += 5; } else if(l6 && l7){ cout << "恭喜你中了九等奖,获得奖金5彩元\n"; qian += 5; } else cout << "很遗憾,你没中奖。\n"; } cout << "中奖号码是:"; for(int i = 1 ; i <= 7 ; i++){ if(b[i] < 10) cout << "0"; cout << b[i]; if(i == 5) cout << " |"; if(i == 7) cout << "。\n"; else cout << " "; } cout << "你还剩" << qian << "彩元。\n"; cout << "你还要玩吗?(玩就输入1,不玩就输入0)。\n"; cin >> l; if(l == 0) break; } } ofstream file("c++彩票模拟器的钱.txt"); file << qian; file.close(); return 0; }
#include <bits/stdc++.h> #include <conio.h> #include <windows.h> using namespace std; const int COLUMN[4] = { 0, 2, 5, 8 }; const int DISC_CNT_MAX = 10; const int ROW_OP_CNT = 2, COL_OP_CNT = 16; const int ROW_MESSAGE = 3, COL_MESSAGE = 16; const int ROW_HELP = 15, COL_HELP = 1; const int ROW_MAX = 30, COL_MAX = 120; const int BLUE = 1; const int GREEN = 2; const int CYAN = 3; const int AQUA = 3; const int RED = 4; const int PURPLE = 5; const int YELLOW = 6; const int WHITE = 7; int n; stack<int> rod[4]; int sz[4] = { 0 }; int pos1, pos2; int key; bool prev_key_is_esc; int op_cnt; bool is_moving; int moved_disc; template <typename T> inline T read() { T x = 0; T multiplier = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') { multiplier = -1; } ch = getchar(); } while (ch >= '0' && ch <= '9') { x = (x << 3) + (x << 1) + (ch & 15); ch = getchar(); } return x * multiplier; } void set_caret_pos(int row = 1, int col = 1) { COORD pos; pos.X = col - 1; pos.Y = row - 1; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos); } int get_caret_row() { CONSOLE_SCREEN_BUFFER_INFO info; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info); return info.dwCursorPosition.Y + 1; } int get_caret_col() { CONSOLE_SCREEN_BUFFER_INFO info; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info); return info.dwCursorPosition.X + 1; } pair<int, int> get_caret_pos() { CONSOLE_SCREEN_BUFFER_INFO info; GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &info); return make_pair(info.dwCursorPosition.Y + 1, info.dwCursorPosition.X + 1); } void set_foreground_color(int x, bool intensity = false) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), x | (intensity << 3)); } void set_cursor_visibility(bool visibility = true) { CONSOLE_CURSOR_INFO cc_info; cc_info.bVisible = visibility; cc_info.dwSize = 1; SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cc_info); } void disp_init_state(int n) { for (int i = 1; i <= n; i++) { set_caret_pos(i, COLUMN[1]); printf("%d", i); } for (int i = 1; i <= 3; i++) { set_caret_pos(n + 1, COLUMN[i] - 1); printf("---"); set_caret_pos(n + 2, COLUMN[i]); putchar('A' + i - 1); } set_caret_pos(ROW_OP_CNT, COL_OP_CNT); printf("0"); } void disp_help() { set_caret_pos(ROW_HELP, COL_HELP); printf("如何玩:\n" "数字表示光盘的尺寸.\n" "将A杆上圆盘移动到C杆上,每次一个.\n" "每个杆上的圆盘必须按大小升序堆叠.\n" "使用左右箭头键选择杆.\n" "按Enter键拾取选定杆上的顶部圆盘.\n" "然后使用左右键移动.\n" "按ESC取消当前移动.\n" "再次按Enter键可将圆盘放置.\n" "按R重新启动.\n" "按ESC键两次退出.\n"); } void disp_pos(int pos1, int pos2 = 0) { for (int i = 1; i <= 3; i++) { set_caret_pos(n + 3, COLUMN[i]); printf(" "); } set_caret_pos(n + 3, COLUMN[pos1]); printf("^"); if (pos2) { set_caret_pos(n + 3, COLUMN[pos2]); set_foreground_color(GREEN, true); printf("^"); set_foreground_color(WHITE); } } void clear() { for (int i = 1; i <= DISC_CNT_MAX + 3; i++) { for (int j = 1; j <= COL_MAX; j++) { set_caret_pos(i, j); putchar(' '); } } } void moving_disc(int pos1, int pos2) { int x = rod[pos1].top(); set_caret_pos(n + 1 - sz[pos1], COLUMN[pos1]); set_foreground_color(RED, true); printf("%d", x); set_foreground_color(WHITE); set_caret_pos(n - sz[pos2] + (pos1 == pos2), COLUMN[pos2]); set_foreground_color(GREEN, true); printf("%d", x); set_foreground_color(WHITE); } void update_discs(int pos1, int pos2) { int x = rod[pos1].top(); set_caret_pos(n + 1 - sz[pos1], COLUMN[pos1]); printf(" "); rod[pos1].pop(); sz[pos1]--; rod[pos2].push(x); sz[pos2]++; set_caret_pos(n + 1 - sz[pos2], COLUMN[pos2]); printf("%d", x); } void remove_temp_disc(int pos) { set_caret_pos(n - sz[pos], COLUMN[pos]); printf(" "); } void update_op_cnt() { op_cnt++; set_caret_pos(ROW_OP_CNT, COL_OP_CNT); printf("%d", op_cnt); } int main() { printf("输入光盘数量(不超过 %d): ", DISC_CNT_MAX); n = min(read<int>(), DISC_CNT_MAX); set_cursor_visibility(false); disp_help(); for (; n <= DISC_CNT_MAX; n++) { clear(); for (int i = 1; i <= 3; i++) { while (!rod[i].empty()) { rod[i].pop(); } sz[i] = 0; } for (int i = n; i >= 1; i--) { rod[1].push(i); } sz[1] = n; is_moving = false; pos1 = 1; op_cnt = 0; prev_key_is_esc = false; disp_init_state(n); disp_pos(1); while (true) { if (sz[3] == n) { set_caret_pos(ROW_MESSAGE, COL_MESSAGE); if (op_cnt != (1 << n) - 1) { printf("你用%d个动作完成了谜题.",op_cnt); } else { printf("祝贺你用最少的动作完成了谜题 " ); } Sleep(2000); break; } key = getch(); if (key == 224) { key = getch(); if (!is_moving) { if (key == 75) { // Left arrow key pos1 = (pos1 + 1) % 3 + 1; } else if (key == 77) { // Right arrow key pos1 = pos1 % 3 + 1; } disp_pos(pos1); } else { remove_temp_disc(pos2); if (key == 75) { // Left arrow key pos2 = (pos2 + 1) % 3 + 1; } else if (key == 77) { // Right arrow key pos2 = pos2 % 3 + 1; } moving_disc(pos1, pos2); disp_pos(pos1, pos2); } } else if (key == 13) { // Enter key if (!is_moving) { if (rod[pos1].empty()) { continue; } is_moving = true; moved_disc = rod[pos1].top(); pos2 = pos1; moving_disc(pos1, pos2); disp_pos(pos1, pos2); } else { if (!rod[pos2].empty() && rod[pos2].top() < moved_disc) { set_caret_pos(ROW_MESSAGE, COL_MESSAGE); printf("提示:光盘未按升序堆叠在棒上。"); continue; } is_moving = false; update_discs(pos1, pos2); update_op_cnt(); pos1 = pos2; disp_pos(pos1); } } else if (key == 27) { // Escape key if (prev_key_is_esc) { // Double ESC break; } if (is_moving) { is_moving = false; remove_temp_disc(pos2); update_discs(pos1, pos1); disp_pos(pos1); } else { prev_key_is_esc = true; } } else if (key == 'R' || key == 'r') { n--; break; } } if (prev_key_is_esc && key == 27) { // Double ESC break; } } set_caret_pos(ROW_MAX - 1, 1); return 0; }
#include <iostream> #include <cstdio> #include <cstdlib> #include <ctime> #include <conio.h> #include <cmath> #include <windows.h> using namespace std; /*** 光标定位 ***/ HANDLE hout=GetStdHandle(STD_OUTPUT_HANDLE); COORD coord; void locate(int x,int y) { coord.X=y; coord.Y=x; SetConsoleCursorPosition(hout,coord); }; /*** 隐藏光标 ***/ void hide() { CONSOLE_CURSOR_INFO cursor_info={1,0}; SetConsoleCursorInfo(hout, &cursor_info); } /*** 生成随机数 ***/ double random(double start, double end) { return start+(end-start)*rand()/(RAND_MAX + 1.0); } /*** 定义地图的长宽,蛇的坐标,长度,方向,食物的位置 ***/ int m,n; struct node { int x,y; }snake[1000]; int snake_length,dir; node food; int direct[4][2]={{-1,0},{1,0},{0,-1},{0,1}}; /*** 输出墙 ***/ void print_wall() { cout << " "; for (int i=1;i<=n;i++) cout << "-"; cout << endl; for (int j=0;j<=m-1;j++) { cout << "|"; for (int i=1;i<=n;i++) cout << " "; cout << "|" << endl; } cout << " "; for (int i=1;i<=n;i++) cout << "-"; } /*** 首次输出蛇,其中snake[0]代表头 ***/ void print_snake() { locate(snake[0].x,snake[0].y); cout << "@"; for (int i=1;i<=snake_length-1;i++) { locate(snake[i].x,snake[i].y); cout << "*"; } } /*** 判断是否撞墙或者自撞 ***/ bool is_correct() { if (snake[0].x==0 || snake[0].y==0 || snake[0].x==m+1 || snake[0].y==n+1) return false; for (int i=1;i<=snake_length-1;i++) { if (snake[0].x==snake[i].x && snake[0].y==snake[i].y) return false; } return true; } /*** 随机生成并输出食物位置 ***/ bool print_food() { srand((unsigned)time(0)); bool e; while (1) { e=true; int i=(int) random(0,m)+1,j=(int) random(0,n)+1; food.x=i;food.y=j; for (int k=0;k<=snake_length-1;k++) { if (snake[k].x==food.x && snake[k].y==food.y) { e=false;break; } } if (e) break; } locate(food.x,food.y); cout << "$"; return true; } /*** 蛇的前进 ***/ bool go_ahead() { node temp; bool e=false; temp=snake[snake_length-1]; for (int i=snake_length-1;i>=1;i--) snake[i]=snake[i-1]; snake[0].x+=direct[dir][0]; snake[0].y+=direct[dir][1]; locate(snake[1].x,snake[1].y); cout << "*"; /*** 吃到了食物 ***/ if (snake[0].x==food.x && snake[0].y==food.y) { snake_length++; e=true; snake[snake_length-1]=temp; } /*** 输出此时蛇状态 ***/ if (!e) { locate(temp.x,temp.y); cout << " "; } else print_food(); locate(snake[0].x,snake[0].y); cout << "@"; /*** 如果自撞 ***/ if (!is_correct()) { system("cls"); cout << "You lose!" << endl << "Length: " << snake_length << endl; return false; } return true; } /*** 主函数 ***/ int main() { system("mode con cols=80 lines=30"); //设置cmd窗口大小 system("color 2"); //设置字符颜色:0 黑;1 深蓝;2 深绿;3 深青;4 深红;5 深紫;6 深褐 cout << "--------------------贪吃蛇---------------------" << endl; cout << "先选择难度.请在1-10中输入1个数,1最简单,10则最难" << endl; cout << "然后进入游戏画面,以方向键控制方向.祝你游戏愉快!" << endl; cout << "-----------------------------------------------" << endl; cout << "请输入难度级别:" ; m=25; n=40; if (m<10 || n<10 || m>25 || n>40) { cout << "ERROR" << endl; system("pause"); return 0; } int hard; cin >> hard; if (hard<=0 || hard>100) { cout << "ERROR" << endl; system("pause"); return 0; } /*** 数据全部初始化,包括蛇长,位置,方向 ***/ snake_length=5; clock_t a,b; char ch; double hard_len; for (int i=0;i<=4;i++) { snake[i].x=1; snake[i].y=5-i; } dir=3; /*** 输出初始地图,蛇与食物 ***/ system("cls"); hide(); print_wall(); print_food(); print_snake(); locate(m+2,0); cout << "Now length: "; /*** 开始游戏 ***/ while (1) { /*** 难度随长度增加而提高 ***/ hard_len=(double)snake_length/(double) (m*n); /*** 调节时间,单位是ms ***/ a=clock(); while (1) { b=clock(); if (b-a>=(int)(400-30*hard)*(1-sqrt(hard_len))) break; } /*** 接受键盘输入的上下左右,并以此改变方向 ***/ if (kbhit()) { ch=getch(); if (ch==-32) { ch=getch(); switch(ch) { case 72: if (dir==2 || dir==3) dir=0; break; case 80: if (dir==2 || dir==3) dir=1; break; case 75: if (dir==0 || dir==1) dir=2; break; case 77: if (dir==0 || dir==1) dir=3; break; } } } /*** 前进 ***/ if (!go_ahead()) break; /*** 在最后输出此时长度 ***/ locate(m+2,12); cout << snake_length; } system("pause"); return 0; }
#include <bits/stdc++.h> #include <conio.h> #include <windows.h> using namespace std; int i = 1,r; double qian = 0,jqq[1000001],a,cs = 0; int main(){ srand(time(NULL)); cout << "注: 这次不会保存游戏币。\n"; cout << "游戏规则: 每次按一次空格键可以加一游戏币,如果加到2147483647(int的整数取值最大范围)获胜。\n如果输入1就可以抽加钱器,你身上最多能使用5个加钱器(系统自动给你使用前5好加钱器),"; cout << "加钱器分三个等级分别是低级(100游戏币)、中级(10000游戏币)、高级(1000000游戏币),每个等级都有普通(67%)、稀有(28%)、史诗(4%)、传说(1%)的四个小等级,\n"; cout << "低级普通加钱器使用后每次按空格键可以增加5游戏币,低级稀有加钱器使用后每次按空格键可以增加10游戏币,低级史诗加钱器使用后获50游戏币,"; cout << "低级传说加钱器使用后每次按空格键可以增加500游戏币,\n中级普通加钱器使用后每次按空格键可以增加100游戏币,中级稀有加钱器使用后每次按空格键可以增加6000游戏币,"; cout << "中级史诗加钱器使用后每次按空格键可以增加10000游戏币,中级传说加钱器使用后每次按空格键可以增加70000游戏币,\n高级普通加钱器使用后每次按空格键可以增加30000游戏币"; cout << "高级稀有加钱器使用后每次按空格键可以增加100000游戏币,高级史诗加钱器使用后每次按空格键可以增加900000游戏币,"; cout << "高级传说加钱器使用后每次按空格键可以增加8000000游戏币。\n如果输入2就可以重生,重生钱会清零,但按一次空格键增加70%游戏币。\n"; int key; while(qian < 2147483647){ key = _getch(); system("cls"); cout << "注: 这次不会保存游戏币。\n"; cout << "游戏规则: 每次按一次空格键可以加一游戏币,如果加到2147483647(int的整数取值最大范围)获胜。\n如果输入1就可以抽加钱器,你身上最多能使用5个加钱器(系统自动给你使用前5好加钱器),"; cout << "加钱器分三个等级分别是低级(100游戏币)、中级(10000游戏币)、高级(1000000游戏币),每个等级都有普通(67%)、稀有(28%)、史诗(4%)、传说(1%)的四个小等级,\n"; cout << "低级普通加钱器使用后每次按空格键可以增加5游戏币,低级稀有加钱器使用后每次按空格键可以增加10游戏币,低级史诗加钱器使用后获50游戏币,"; cout << "低级传说加钱器使用后每次按空格键可以增加500游戏币,\n中级普通加钱器使用后每次按空格键可以增加100游戏币,中级稀有加钱器使用后每次按空格键可以增加6000游戏币,"; cout << "中级史诗加钱器使用后每次按空格键可以增加10000游戏币,中级传说加钱器使用后每次按空格键可以增加70000游戏币,\n高级普通加钱器使用后每次按空格键可以增加30000游戏币"; cout << "高级稀有加钱器使用后每次按空格键可以增加100000游戏币,高级史诗加钱器使用后每次按空格键可以增加900000游戏币,"; cout << "高级传说加钱器使用后每次按空格键可以增加8000000游戏币。\n如果输入2就可以重生,重生钱会清零,但按一次空格键增加70%游戏币。\n"; if(key == 32){ sort(jqq+1,jqq+i,greater<double>()); qian = qian + (jqq[1] + jqq[2] + jqq[3] + jqq[4] + jqq[5] + 1) * pow(1.7,cs); cout << "钱: " << int(qian) << " 重生次数:" << cs << " 每次能增加的钱数: " << (jqq[1] + jqq[2] + jqq[3] + jqq[4] + jqq[5] + 1) * pow(1.7,cs) << endl; } else if(key == 49){ system("cls"); cout << "注: 这次不会保存游戏币。\n"; cout << "游戏规则: 每次按一次空格键可以加一游戏币,如果加到2147483647(int的整数取值最大范围)获胜。\n如果输入1就可以抽加钱器,你身上最多能使用5个加钱器(系统自动给你使用前5好加钱器),"; cout << "加钱器分三个等级分别是低级(100游戏币)、中级(10000游戏币)、高级(1000000游戏币),每个等级都有普通(67%)、稀有(28%)、史诗(4%)、传说(1%)的四个小等级,\n"; cout << "低级普通加钱器使用后每次按空格键可以增加5游戏币,低级稀有加钱器使用后每次按空格键可以增加10游戏币,低级史诗加钱器使用后获50游戏币,"; cout << "低级传说加钱器使用后每次按空格键可以增加500游戏币,\n中级普通加钱器使用后每次按空格键可以增加100游戏币,中级稀有加钱器使用后每次按空格键可以增加6000游戏币,"; cout << "中级史诗加钱器使用后每次按空格键可以增加10000游戏币,中级传说加钱器使用后每次按空格键可以增加70000游戏币,\n高级普通加钱器使用后每次按空格键可以增加30000游戏币"; cout << "高级稀有加钱器使用后每次按空格键可以增加100000游戏币,高级史诗加钱器使用后每次按空格键可以增加900000游戏币,"; cout << "高级传说加钱器使用后每次按空格键可以增加8000000游戏币。\n如果输入2就可以重生,重生钱会清零,但按一次空格键增加70%游戏币。\n"; cout << "你要抽低级加钱器,还是中级加钱器,还是高级加钱器。(分别输入1,2,3)\n"; cin >> a; r = rand() % 100 + 1; if(a == 1){ if(qian < 100){ cout << "你没有足够的钱。\n"; continue; } else qian -= 100; if(r >= 1 && r <= 67){ cout << "恭喜你抽到了低级普通加钱器。\n"; jqq[i] = 5; i++; } else if(r >= 68 && r <= 95){ cout << "恭喜你抽到了低级稀有加钱器。\n"; jqq[i] = 10; i++; } else if(r >= 96 && r <= 99){ cout << "恭喜你抽到了低级史诗加钱器。\n"; jqq[i] = 50; i++; } else if(r == 100){ cout << "恭喜你抽到了低级传说加钱器。\n"; jqq[i] = 500; i++; } } else if(a == 2){ if(qian < 10000){ cout << "你没有足够的钱。\n"; continue; } else qian -= 10000; if(r >= 1 && r <= 67){ cout << "恭喜你抽到了中级普通加钱器。\n"; jqq[i] = 100; i++; } else if(r >= 68 && r <= 95){ cout << "恭喜你抽到了中级稀有加钱器。\n"; jqq[i] = 6000; i++; } else if(r >= 96 && r <= 99){ cout << "恭喜你抽到了中级史诗加钱器。\n"; jqq[i] = 10000; i++; } else if(r == 100){ cout << "恭喜你抽到了中级传说加钱器。\n"; jqq[i] = 70000; i++; } } else if(a == 3){ if(qian < 1000000){ cout << "你没有足够的钱。\n"; continue; } else qian -= 1000000; if(r >= 1 && r <= 67){ cout << "恭喜你抽到了高级普通加钱器。\n"; jqq[i] = 30000; i++; } else if(r >= 68 && r <= 95){ cout << "恭喜你抽到了高级稀有加钱器。\n"; jqq[i] = 100000; i++; } else if(r >= 96 && r <= 99){ cout << "恭喜你抽到了高级史诗加钱器。\n"; jqq[i] = 900000; i++; } else if(r == 100){ cout << "恭喜你抽到了高级传说加钱器。\n"; jqq[i] = 8000000; i++; } } } else if(key == 50){ cout << "欢迎来重生。\n"; if(qian < 1000 * pow(10,cs)){ cout << "你没有足够的钱。\n"; continue; } qian = 0; cs++; cout << "重生成功。\n"; } } cout << "你赢了!\n"; return 0; }
#include <stdio.h> #include <conio.h> #include <windows.h> #include <time.h> #define Height 25 //迷宫的高度,必须为奇数 #define Width 25 //迷宫的宽度,必须为奇数 #define Wall 1 #define Road 0 #define Start 2 #define End 3 #define Esc 5 #define Up 1 #define Down 2 #define Left 3 #define Right 4 int map[Height+2][Width+2]; void gotoxy(int x,int y) //移动坐标 { COORD coord; coord.X=x; coord.Y=y; SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), coord ); } void hidden()//隐藏光标 { HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_CURSOR_INFO cci; GetConsoleCursorInfo(hOut,&cci); cci.bVisible=0; //赋1为显示,赋0为隐藏 SetConsoleCursorInfo(hOut,&cci); } void create(int x,int y) //随机生成迷 { int c[4][2]= { 0,1,1,0,0,-1,-1,0 } ; //四个方向 int i,j,t; //将方向打乱 for (i=0;i<4;i++) { j=rand()%4; t=c[i][0]; c[i][0]=c[j][0]; c[j][0]=t; t=c[i][1]; c[i][1]=c[j][1]; c[j][1]=t; } map[x][y]=Road; for (i=0;i<4;i++) if(map[x+2*c[i][0]][y+2*c[i][1]]==Wall) { map[x+c[i][0]][y+c[i][1]]=Road; create(x+2*c[i][0],y+2*c[i][1]); } } int get_key() //接收按键 { char c; while(c=getch()) { if(c==27) return Esc; //Esc if(c!=-32)continue; c=getch(); if(c==72) return Up; //上 if(c==80) return Down; //下 if(c==75) return Left; //左 if(c==77) return Right; //右 } return 0; } void paint(int x,int y) //画迷宫 { gotoxy(2*y-2,x-1); switch(map[x][y]) { case Start: printf("入"); break; //画入口 case End: printf("出"); break; //画出口 case Wall: printf("▇"); break; //画墙 case Road: printf(" "); break; //画路 } } void game() { int x=2,y=1; //玩家当前位置,刚开始在入口处 int c; //用来接收按键 while(1) { gotoxy(2*y-2,x-1); printf("A"); //画出玩家当前位置 if(map[x][y]==End) //判断是否到达出口 { gotoxy(30,24); printf("\n"); // printf("到达终点,按任意键结束"); getch(); break; } c=get_key(); if(c==Esc) { gotoxy(0,24); break; } switch(c) { case Up: //向上走 if(map[x-1][y]!=Wall) { paint(x,y); x--; } break; case Down: //向下走 if(map[x+1][y]!=Wall) { paint(x,y); x++; } break; case Left: //向左走 if(map[x][y-1]!=Wall) { paint(x,y); y--; } break; case Right: //向右走 if(map[x][y+1]!=Wall) { paint(x,y); y++; } break; } } } int main() { int i,j; srand((unsigned)time(NULL)); //初始化随即种子 hidden(); //隐藏光标 for (i=0;i<=Height+1;i++) for (j=0;j<=Width+1;j++) if(i==0||i==Height+1||j==0||j==Width+1) //初始化迷宫 map[i][j]=Road; else map[i][j]=Wall; create(2*(rand()%(Height/2)+1),2*(rand()%(Width/2)+1)); //从随机一个点开始生成迷宫,该点行列都为偶数 for (i=0;i<=Height+1;i++) //边界处理 { map[i][0]=Wall; map[i][Width+1]=Wall; } for (j=0;j<=Width+1;j++) //边界处理 { map[0][j]=Wall; map[Height+1][j]=Wall; } map[2][1]=Start; //给定入口 map[Height-1][Width]=End; //给定出口 for (i=1;i<=Height;i++) for (j=1;j<=Width;j++) //画出迷宫 paint(i,j); game(); //开始游戏 getch(); return 0; }
-
最近活动
- 【oiClass公益赛】2025CSP-J模拟赛#10 OI
- 【oiClass公益赛】2025CSP-J模拟赛#09 OI
- 【oiClass公益赛】2025CSP-J模拟赛#08 OI
- 【oiClass公益赛】2025CSP-J模拟赛#01 OI
- 2024小六秋季班第十四课《深度优先搜索算法2》 作业
- 2024小六秋季班第十三课《深度优先搜索算法1》 作业
- 2024小六秋季班第十一课《递归算法1》 作业
- 2024小六秋季班第九课《栈结构》 作业
- 2024小六秋季班第八课《前缀和&差分前缀和》 作业
- 2024小六秋季班第七课《贪心算法》 作业
- 2024小六秋季班第六课《枚举算法》 作业
- 2024小六秋季班测试1改题 作业
- 2024小六秋季班第四课《模拟算法》 作业
- 2024小六秋季班第三课《排序和结构体排序》 作业
- 2024小六秋季班第二课《位运算》 作业
- 2024小六秋季班第一课《进制转换》 作业
- 2024oiClass入门组周赛计划#16 IOI
- 2024oiClass入门组周赛计划#09 IOI
- 2024oiClass入门组周赛计划#06 IOI
- 2024oiClass入门组周赛计划#02 IOI
- 2024oiClass入门组周赛计划#01 IOI
- 第五届oiClass信息学夏令营线上正式邀请赛3 OI
- 第五届oiClass信息学夏令营线上正式邀请赛2 OI
- 第五届oiClass信息学夏令营线上正式邀请赛1 OI
- 第五届oiClass信息学夏令营线上模拟测试1 OI
- 第五届oiClass信息学夏令营day7作业-for循环专题练习1 作业
- 第五届oiClass信息学夏令营day21作业-二维数组和二维字符数组 作业
- 第五届oiClass信息学夏令营day20作业-二维数组基础 作业
- 第五届oiClass信息学夏令营day19作业-数组与递推算法 作业
- 第五届oiClass信息学夏令营day18作业-普通排序和桶排序 作业
- 第五届oiClass信息学夏令营day17作业-数组标记的应用 作业
- 第五届oiClass信息学夏令营线上模拟测试3 OI
- 第五届oiClass信息学夏令营day15作业-字符、字符数组和字符串 作业
- 第五届oiClass信息学夏令营线上模拟测试2 OI
- 第五届oiClass信息学夏令营day5作业-for语句2 作业
- 第五届oiClass信息学夏令营day4作业-for语句1 作业
- 第五届oiClass信息学夏令营day3作业-if语句 作业
- 第五届oiClass信息学夏令营day2作业-表达式 作业
- 第五届oiClass信息学夏令营day1作业-C++程序结构 作业
- 2024春季线上班class13、差值动态规划的应用 作业
- 2024春季线上班class12、多维动态规划的应用 作业
- 2024春季线上班class15-期末测试 OI
- 2024春季线上班class11、动态规划的综合应用 作业
- 2024春季线上班class10、倍增-ST算法 课后作业 作业
- 2024春季线上班class10、倍增-ST算法 随堂练习 作业
- 2024春季线上班class9、区间型动态规划2-区间合并 课后作业 作业
- 2024春季线上班class9、区间型动态规划2-区间合并 随堂练习 作业
- 2024春季线上班class8、区间型动态规划1-区间分割 课后作业 作业
- 2024春季线上班class7、背包型动态规划2课后作业 作业
- 2024春季线上班class7、背包型动态规划2随堂练习 作业
- 2024春季线上班class6、背包型动态规划1课后作业 作业
- 2024春季线上班class6、背包型动态规划1随堂练习 作业
- 2024春季线上班class4、最长公共子序列课后作业 作业
- 2024春季线上班class4、最长公共子序列随堂练习 作业
- 【oiClass公益赛】2024CSP-J模拟赛#20 OI
- 2024春季线上班class3、二维动规课后作业 作业
- 2024春季线上班class3、二维动规随堂练习 作业
- 2024春季线上班class2、最长不下降子序列课后作业 作业
- 2024春季线上班class2、最长不下降子序列随堂练习 作业
- 2024春季线上班class1、一维动规随堂练习 作业
- 【oiClass公益赛】2024CSP-J模拟赛#09 OI
- 2023年秋季营lesson15作业-深度优先搜索算法2 作业
- 2023年秋季营lesson14作业-深度优先搜索算法1 作业
- 2023年秋季营lesson13作业-递归算法2 作业
- 2023年秋季营lesson12作业-递归算法1 作业
- 2023年秋季营lesson10作业2-队 作业
- 2023年秋季营lesson10作业1-栈 作业
- 2023年秋季营lesson9作业1-递推算法 作业
- 2023年秋季营lesson8作业-指针&贪心 作业
- 2023年秋季营lesson7作业-位运算 作业
- 2023年秋季营lesson6作业-进制转换 作业
- 2023年秋季营lesson5作业-2023秋季营阶段测试1(仅供改题) 作业
- 【oiClass公益赛】2023CSPJ模拟赛#02 OI
- 【oiClass公益赛】2023CSPJ模拟赛#01 OI
- 2023年秋季营lesson4作业-排序&枚举 作业
- 第五届oiClass信息学夏令营day22作业-结构体和函数 作业
- 2023学年秋季班_模拟测试02 OI
- 2023年秋季营lesson2作业-字符数组&字符串 作业
- 2023学年秋季班_模拟测试01 OI
- 2023年秋季营lesson1作业-二维数组 作业
- 夏令营模拟测试-05 OI
- 夏令营模拟测试-04 OI
- 夏令营模拟测试-03 OI
- 新初一夏令营day10作业-一维数组1 作业
- 夏令营day18作业-一维数组3 作业
- 2023年第四届oiClass夏令营线上选拔赛 OI
- 夏令营day17作业-一维数组2 作业
- 夏令营第二周模拟测试 OI
- 夏令营day10作业-while语句1 作业
- 夏令营day9作业-for语句综合练习 作业
- 第五届oiClass信息学夏令营day6作业-for语句3 作业
- 夏令营第一周模拟测试 OI
- 夏令营day5作业-for语句2 作业
- 夏令营day4作业-for语句1 作业
- 夏令营day3作业-if语句 作业
- 夏令营day2作业-表达式 作业
- 夏令营day1作业-C++程序结构 作业
-
Stat
-
Rating