跳到正文

休闲·娱乐

班主任模拟器26.4.21.1

AK____IOI约 26 分钟
原文
文章信息与版本

文章信息

发布
2026年4月21日
收录
2026年4月26日
更新
2026年12月2日
篇幅
约 26 分钟

版本

  1. v3当前
  2. v2
  3. v1

#include<bits/stdc++.h> #include<time.h> #include<windows.h> using namespace std; int cc,money,nd,ts,sj,jd,cj[1001],aaa; string ccc; struct A{ long double id,yw,sx,yy,kx,wl,hx,sw,yl=0; string name=""; }stu[10]; void slowsay(string a){ for(int i=0;i<a.size();i++){ cout<<a[i]; Sleep(30); } } void maxx(){ for(int i=0;i<5;i++){ if(stu[i].yw>150){ stu[i].yw=150; }if(stu[i].sx>150){ stu[i].sx=150; }if(stu[i].yy>150){ stu[i].yy=150; }if(stu[i].kx>100){ stu[i].kx=100; }if(stu[i].wl>100){ stu[i].wl=100; }if(stu[i].hx>100){ stu[i].hx=100; }if(stu[i].sw>100){ stu[i].sw=100; } }

} void zx(){ system(“cls”); if(jd==1) cout<<“\n你要自习哪个学科?(语文1,数学2,英语3,科学4)\n”; else cout<<“\n你要自习哪个学科?(语文1,数学2,英语3,物理4,化学5,生物6)\n”; cin>>cc; if(cc==1){ for(int i=0;i<5;i++){ stu[i].yw+=rand()%5; } }else if(cc==2){ for(int i=0;i<5;i++){ stu[i].sx+=rand()%5; } }else if(cc==3){ for(int i=0;i<5;i++){ stu[i].yy+=rand()%5; } }else if(cc==4){ if(jd==1){ for(int i=0;i<5;i++){ stu[i].kx+=rand()%5; } }else{ for(int i=0;i<5;i++){ stu[i].wl+=rand()%5; } } }else if(cc==5){ for(int i=0;i<5;i++){ stu[i].hx+=rand()%5; } }else if(cc==6){ for(int i=0;i<5;i++){ stu[i].sw+=rand()%5; } } for(int i=0;i<5;i++){ stu[i].yl+=rand()%15+15; } maxx(); } void xc(int &money){ system(“cls”); if(money<500){ cout<<“资金不足,无法小测\n”; Sleep(1000); return; } if(jd==1) cout<<“\n你要小测哪个学科?(语文1,数学2,英语3,科学4)\n”; else cout<<“\n你要小测哪个学科?(语文1,数学2,英语3,物理4,化学5,生物6-)\n”; cin>>cc; if(cc==1){ for(int i=0;i<5;i++){ stu[i].yw+=rand()%51.5; } }else if(cc==2){ for(int i=0;i<5;i++){ stu[i].sx+=rand()%51.5; } }else if(cc==3){ for(int i=0;i<5;i++){ stu[i].yy+=rand()%51.5; } }else if(cc==4){ if(jd==1){ for(int i=0;i<5;i++){ stu[i].kx+=rand()%51.5; } }else{ for(int i=0;i<5;i++){ stu[i].wl+=rand()%51.5; } } }else if(cc==5){ for(int i=0;i<5;i++){ stu[i].hx+=rand()%51.5; } }else if(cc==6){ for(int i=0;i<5;i++){ stu[i].sw+=rand()%51.5; } } for(int i=0;i<5;i++){ stu[i].yl+=rand()%15+20; } money-=500; maxx(); } void mnk(int &money){ system(“cls”); if(money<1000){ cout<<“资金不足,无法小测\n”; Sleep(1000); return; } for(int i=0;i<5;i++){ stu[i].yw+=rand()%5; stu[i].sx+=rand()%5; stu[i].yy+=rand()%5; stu[i].kx+=rand()%5; if(jd>=2){ stu[i].wl+=rand()%5; stu[i].hx+=rand()%5; stu[i].sw+=rand()%5; } stu[i].yl+=rand()%15+25; } money-=1000; maxx(); } void tx(int &money){ system(“cls”); if(money<2500){ cout<<“资金不足,无法特训\n”; Sleep(1000); return; } for(int i=0;i<5;i++){ stu[i].yw+=rand()%52; stu[i].sx+=rand()%52; stu[i].yy+=rand()%52; stu[i].kx+=rand()%52; if(jd>=2){ stu[i].wl+=rand()%52; stu[i].hx+=rand()%52; stu[i].sw+=rand()%52; } stu[i].yl+=rand()%15+30; } money-=2500; maxx(); } void xx(){ for(int i=0;i<5;i++){ stu[i].yw-=rand()%5/2; stu[i].sx-=rand()%5/2; stu[i].yy-=rand()%5/2; stu[i].kx-=rand()%5/2; if(jd>=2){ stu[i].wl-=rand()%5/2; stu[i].hx-=rand()%5/2; stu[i].sw-=rand()%5/2; } stu[i].yl-=rand()%15+20; } } void cj111(){ cout<<“获得成就:\n\n”; if(cj[0]==1) cout<<“你好,大学\n”; else cout<<”?????\n”; if(cj[1]==1) cout<<“年度优秀教师\n”; else cout<<”?????\n”; if(cj[2]==1) cout<<“先帝创业未半而中途……\n”; else cout<<”?????\n”; if(cj[3]==1) cout<<“985?有点意思\n”; else cout<<”?????\n”; if(cj[4]==1) cout<<“怎么会变成这样呢?\n”; else cout<<”?????\n”; Sleep(2000); return; } void cd() { ofstream outFile(“班主任模拟器.txt”); if(!outFile.is_open()){ cerr<<“Error: Could not open file for writing.”<<endl; Sleep(2000); return; } for (int i=0;i<5;i++){ outFile<<cj[i]<<” ”; } outFile.close(); } void dd() { ifstream inFile(“班主任模拟器.txt”); if(!inFile.is_open()){ cerr<<“Error: Could not open file for reading.”<<endl; Sleep(2000); return; } for(int i=0;i<5;i++){ if(!(inFile>>cj[i])){ cerr<<“Error: Failed to read data at index “<<i<<endl; inFile.close(); Sleep(2000); return; } } inFile.close(); }

int main(){ srand(time(0)); while(true){ aaa==0; do{ aaa=0; system(“cls”); cout<<“欢迎来到班主任模拟器\n”; cout<<“请选择难度:\n”; system(“color 0F”); cout<<“1.简单 2.现实 3.更新日志 4.成就 5.存档 6.读档”; cin>>cc; if(cc==3){ system(“cls”); cout<<“1.0 创造游戏\n”; cout<<“1.1 增加难度选择\n”; cout<<“1.2 增加金币系统\n”; cout<<“1.3 增加随机事件\n”; cout<<“1.4 增加教学阶段,初中新三科\n”; cout<<“1.5 增加总考\n”; cout<<“1.6 增加特训功能\n”; cout<<“1.7 增加教学评价\n”; cout<<“1.8 增加大学录取\n”; cout<<“1.9 调节游戏平衡\n”; cout<<“2.0 添加4个成就\n”; cout<<“2.1 增加存档功能\n”; cout<<“26.4.20.2 更新版本号\n”; cout<<“26.4.20.3 修复大部分bug\n”; cout<<“26.4.21.1 修复一些你可能没遇到的问题\n”; Sleep(4000); } if(cc==4){ system(“cls”); cj111(); } if(cc==5){ system(“cls”); cd(); } if(cc==6){ system(“cls”); dd(); } } while(cc==3||cc==4||cc==5||cc==6); if(cc==1){ money=5000; for(int i=0;i<5;i++){ stu[i].id=i; stu[i].yw=rand()%21+60; stu[i].sx=rand()%21+60; stu[i].yy=rand()%21+60; stu[i].kx=rand()%21+60; stu[i].wl=rand()%21+60; stu[i].hx=rand()%21+60; stu[i].sw=rand()%21+60; stu[i].name=""; stu[i].yl=0; } nd=1; }else if(cc==2){ money=2000; for(int i=0;i<5;i++){ stu[i].id=i; stu[i].yw=rand()%21+50; stu[i].sx=rand()%21+50; stu[i].yy=rand()%21+50; stu[i].kx=rand()%21+50; stu[i].wl=rand()%21+50; stu[i].hx=rand()%21+50; stu[i].sw=rand()%21+50; stu[i].name=""; stu[i].yl=0; } nd=2; } cout<<“是否自定义学生的名字?1.是 2.否\n”; cin>>cc; if(cc==1){ for(int i=0;i<5;i++){ cout<<“第”<<i<<“个学生:”; cin>>ccc; stu[i].name=ccc; cout<<“\n”; } }else if(cc==2){ for(int i=0;i<5;i++){ sj=rand()%7+1; for(int j=0;j<sj;j++){ stu[i].name+=char(rand()%26+‘A’); } } } for(int time=0;time<=72+72;time++){ system(“cls”); if(ts>=3){ if(MessageBox(NULL,“你因受到太多投诉,被开除了”,“game over”,MB_OK)==IDOK){ ts=0; cout<<“获得成就:先帝创业未半而中途……\n”; Sleep(1000); cj[2]=1; break; } } sj=rand(); if(time==6||time==11) sj=214; if(sj%5<=1){ if(nd==1) sj=rand()%500+1000; else if(nd==2) sj=rand()%500+500; cout<<“你获得了上级资助的”<<sj<<“元\n”; money+=sj; }else if(sj%7<=1){ cout<<“有商业活动,是否参加?1.是 2.否\n”; cin>>cc; if(cc==1){ if(nd==1) sj=rand()%500+1000; else if(nd==2) sj=rand()%500+500; cout<<“你获得了”<<sj<<“元\n”; Sleep(1000); money+=sj; continue; }else if(cc==2){ cout<<“好吧\n”; Sleep(1000); system(“cls”); } }else if(sj%6<=1){ sj=rand()%500+1000; cout<<“家人生病,-“<<sj<<“元\n”; money-=sj;

C++
		}
		cout<<"资金:"<<money<<"  "<<time/12+2026<<"年"<<time%12+1<<"月"<<" 阶段";
		if(time<=72){
			cout<<"小学\n";
			jd=1;
		}else if(time<=72+36){
			cout<<"初中\n";
			jd=2;
		}else{
			cout<<"高中\n"; 
			jd=3;
		}
		cout<<"---------------------------------------------------------------\n";
		for(int i=0;i<5;i++){
			if(jd==1) cout<<"|"<<stu[i].name<<" 语文:"<<stu[i].yw<<" 数学:"<<stu[i].sx<<" 英语:"<<stu[i].yy<<" 科学:"<<stu[i].kx<<" 压力:"<<stu[i].yl<<"|\n";
			else cout<<"|"<<stu[i].name<<" 语文:"<<stu[i].yw<<" 数学:"<<stu[i].sx<<" 英语:"<<stu[i].yy<<" 物理:"<<stu[i].wl<<" 化学:"<<stu[i].hx<<" 生物"<<stu[i].sw<<" 压力:"<<stu[i].yl<<"|\n";
			if(stu[i].yl>=100){
				sj=rand()%20;
				if(sj<=7){
					cout<<"这名学生压力过大,成绩降低\n";
					stu[i].yw-=rand()%7;
					stu[i].sx-=rand()%7;
					stu[i].yy-=rand()%7;
					stu[i].kx-=rand()%7;
				}else{
					cout<<"这名学生压力过大,有成绩降低的迹象\n";
				}
			}
			if(stu[i].yl>=130){
				sj=rand()%20;
				if(sj<=7){
					cout<<"这名学生压力过大,投诉了你\n";
					ts++;
				}else{
					sj=rand()%500+1000;
					cout<<"突发情况,这名学生因压力过大晕倒,你被扣了"<<sj<<"元\n";
				}
			}
			cout<<"|-------------------------------------------------------------|\n";
			if(money<=0){
				system("cls");
				if(MessageBox(NULL,"你破产了","game over",MB_OK)==IDOK){
					cout<<"获得成就:先帝创业未半而中途……\n";
					Sleep(1000);
					cj[2]=1;
					aaa=1;
					break;
				}
			}
			if(aaa==1){
				break;
			}
		}
		if(aaa==1){
			break;
		}
		if(time%12==6&&aaa==0){
			system("cls");
			cout<<"今天期中考\n";
			Sleep(1000); 
			sj=0;
			for(int i=0;i<5;i++){
				if(jd==1) cout<<stu[i].name<<" 语文:"<<stu[i].yw<<" 数学:"<<stu[i].sx<<" 英语:"<<stu[i].yy<<" 科学:"<<stu[i].kx<<"\n";
				else cout<<stu[i].name<<" 语文:"<<stu[i].yw<<" 数学:"<<stu[i].sx<<" 英语:"<<stu[i].yy<<" 物理:"<<stu[i].wl<<" 化学:"<<stu[i].hx<<" 生物:"<<stu[i].sw<<"\n";
				if(jd==1) sj+=stu[i].yw+stu[i].sx+stu[i].yy+stu[i].kx;
				else sj+=stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].hx+stu[i].sw;
			}
			sj-=5*(280+time);
			cout<<"你获得了"<<sj<<"元\n";
			Sleep(1000);
			money+=sj; 
		}else if(time%12==11&&aaa==0){
			system("cls");
			cout<<"今天期末考\n";
			Sleep(1000);
			sj=0;
			for(int i=0;i<5;i++){
				if(jd==1) cout<<stu[i].name<<" 语文:"<<stu[i].yw<<" 数学:"<<stu[i].sx<<" 英语:"<<stu[i].yy<<" 科学:"<<stu[i].kx<<"\n";
				else cout<<stu[i].name<<" 语文:"<<stu[i].yw<<" 数学:"<<stu[i].sx<<" 英语:"<<stu[i].yy<<" 物理:"<<stu[i].wl<<" 化学:"<<stu[i].hx<<" 生物:"<<stu[i].sw<<"\n";
				if(jd==1) sj+=stu[i].yw+stu[i].sx+stu[i].yy+stu[i].kx;
				else sj+=stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].hx+stu[i].sw;
			}
			sj-=5*(280+time);
			cout<<"你获得了"<<sj<<"元\n";
			Sleep(1000);
			money+=sj; 
		}else if(time==72||time==72+36||time==72+72&&aaa==0){
			system("cls");
			system("color C");
			slowsay("今天是检测你教学成果的考试\n");
			Sleep(1000);
			sj=0;
			if(time==144){
				system("color 0F");
				int cj1=0,cj2=0,cj3=0;
				cout<<"---------------------------------------------------------------\n";
				for(int i=0;i<5;i++){
					cout<<"|"<<"总分:"<<stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].sw+stu[i].hx<<"考上了";
					if(stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].sw+stu[i].hx>650){
						cout<<"北京大学|\n";
						cj1=1;
						cj2+=1;
						cj3=1;
					}else if(stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].sw+stu[i].hx>610){
						cout<<"厦门大学|\n";
						cj1=1;
						cj2+=1;
						cj3=1;
					}else if(stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].sw+stu[i].hx>580){
						cout<<"江苏科技大学|\n";
						cj1=1;
						cj2+=1;
					}else if(stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].sw+stu[i].hx>530){
						cout<<"山东师范大学|\n";
						cj1=1;
						cj2+=1;
					}else if(stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].sw+stu[i].hx>500){
						cout<<"宁德师范学院|\n";
						cj1=1;
						cj2+=1;
					}else if(stu[i].yw+stu[i].sx+stu[i].yy+stu[i].wl+stu[i].sw+stu[i].hx>440){
						cout<<"集美大学诚毅学院|\n";
						cj1=1;
						cj2+=1;
					}else{
						cout<<"无大学|\n";
					}
				}
				if(cj1==1){
					cout<<"获得成就:你好,大学\n";
					cj[0]=1;
					cj1=0;
					Sleep(1000);
				}
				if(cj2==5){
					cout<<"获得成就:年度优秀教师\n";
					cj[1]=1;
					cj2=0;
					Sleep(1000);
				}
				if(cj3==1){
					cout<<"获得成就:985?有点意思\n";
					cj[2]=1;
					Sleep(1000);
				}
				if(cj2==0){
					cout<<"获得成就:怎么会变成这样呢?\n";
					cj[4]=1;
					Sleep(1000);
				}
				cout<<"---------------------------------------------------------------\n";
			}
			for(int i=0;i<5;i++){
				if(jd==1) cout<<stu[i].name<<" 语文:"<<stu[i].yw<<" 数学:"<<stu[i].sx<<" 英语:"<<stu[i].yy<<" 科学:"<<stu[i].kx<<"\n";
				else cout<<stu[i].name<<" 语文:"<<stu[i].yw<<" 数学:"<<stu[i].sx<<" 英语:"<<stu[i].yy<<" 物理:"<<stu[i].wl<<" 化学:"<<stu[i].hx<<" 生物"<<stu[i].sw<<"\n";
				sj+=stu[i].yw+stu[i].sx+stu[i].yy+stu[i].kx;
			}
			cout<<"\n";
			if(sj<=1200){
				system("color 0C");
				slowsay("本次班级平均分未达及格线,作为班级的'掌舵人',你或许需要重新审视教学策略了。是课程进度过快导致基础薄弱?还是课堂互动不足让学生兴趣缺失?不妨放慢节奏,从核心知识点入手,通过趣味化的教学方式唤醒学生的学习动力。每一次低谷都是改进的契机,调整方向,你一定能带领班级实现逆袭!");
			}else if(sj<=1600){
				system("color 0C");
				slowsay("本次班级平均分未达80分,说明咱们的教学还有提升空间。或许部分学生对重难点知识理解不够透彻,或是课堂互动环节没能充分调动所有人的积极性。不妨抽时间梳理一下近期的教学内容,针对薄弱知识点设计更具趣味性的巩固练习,多关注边缘学生的学习状态,相信调整后班级成绩会稳步提升。");
			}else if(sj<=1800){
				system("color 0B");
				slowsay("本次班级平均分稳定在80-90分区间,这份成绩背后离不开你的用心付出!大部分学生已经扎实掌握了核心知识点,课堂上的积极互动和课后作业的认真完成,都能看出教学策略的有效性。不过,部分学生在难题拓展上还有提升空间,不妨尝试设计分层拓展任务,鼓励学有余力的学生挑战自我,让班级成绩再上一个新台阶!");
			}else if(sj<=2000){
				system("color 0E");
				slowsay("班级平均分稳定在90-100分,已经是相当亮眼的成绩了!但追求卓越的道路永无止境,不妨试着挑战更高的目标:比如针对学有余力的学生开展拓展性教学,引导他们探索更深奥的知识;或是尝试创新教学模式,让课堂变得更加生动有趣。相信以你的能力,一定能带领班级突破现有瓶颈,创造更辉煌的成绩!");
			}else if(sj<=2400){
				system("color 0A");
				slowsay("班级平均分在100-120分,说明你的教学已经打下了坚实的基础,但距离满分仍有不小的提升空间。接下来可以针对难题、拓展题设计专项训练,引导学生突破思维局限,培养举一反三的能力;同时关注个别学生的薄弱环节,通过个性化辅导帮助他们补齐短板。以你的教学能力,只要再精准发力,班级平均分定能再上一个新台阶!"); 
			}else{
				system("color 0A");
				slowsay("班级平均分稳定在120-150分区间,充分说明您在教学过程中,既兼顾了基础知识的夯实,又能合理拓展知识深度,让不同层次的学生都能在课堂上有所收获。您善于发现学生的知识薄弱点,通过有针对性的讲解和练习,帮助学生逐步提升成绩,这种精准教学的能力,是班级成绩保持稳定的关键。");
			}
			system("color 0F");
		}else if(aaa==0){
			cout<<"你要?1.自习 2.小测(相当于1.5倍自习,500元)3.模拟考(全科加一次自习效果,1000元)4.特训(全科加一次自习*2倍效果,2500元)5.休息\n";
			cin>>cc;
			if(cc==1) zx();
			else if(cc==2) xc(money);
			else if(cc==3) mnk(money); 
			else if(cc==4) tx(money);
			else if(cc==5) xx();
		}
	if(aaa==1) break;
	}
}

return 0;

}

原文