版本比较
P3808 AC代码
正文
增加 217 行删除 80 行
62 行未改动636465666768697071727315 行未改动89909192909394959694959798991009810110210310410510610710810911011110010110210310410510610710811211311011411511611211711411511611811912011811912012112212312412512612112212312412512612712812913013113213313413513613712812913013113213813914014114213413513613713813914014314414514614714814915015115214215315414415515614614714815715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527615415515615727727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331416216316416516616716816917017117217317417517631531631717918018118218318418518618718818919031831932032132232332419232532632732832933033119933233320120233433533633720433833934034134234334434534662 行未改动```
```cpp/*公告:调整数值,增加 Do_2 函数*//*Do_1跳过的BUG被修复*//*注:需要使用-std=c++14*/#include<bits/stdc++.h>#include<conio.h>#include<windows.h>using namespace std;15 行未改动 if(stu.cut<=0)cout<<"你成为了蒟蒻,你变成了老帅口中美味的果冻\n",exit(0); if(stu.touch<=0)cout<<"你成为了植物人,你变成了老帅口中美味的蔬菜\n",exit(0);} void up_play(){ if(rng()%4==0)cout<<"你成为了键盘,被老帅上转转二手回收,变成了废品。\n",exit(0); if(rng()%17==0)cout<<"你成为了键盘,被老帅上转转二手回收,变成了废品。\n",exit(0); else{ cout<<"你被老帅罚扎马步了。\n"; Sleep(666); stu.happy-=rng()%10+8; stu.touch-=rng()%3+2; stu.happy-=rng()%8+8; stu.touch+=rng()%2+2; }}void Do_0(){void un_study(){ if(rng()%17==0)cout<<"你被CZS辞退,送入了宰猪场。\n",exit(0); else{ cout<<"你被老帅骂了一顿。\n"; Sleep(666); stu.happy-=rng()%5+5; stu.cut+=rng()%2+1; }}void Do_2(){ int a=rng()%100;// int LZ=0;// if(a==1){// cout<<"今天LZ代课\n";// LZ=1;// } // if(a==2||a==3){// cout<<"今天打模拟赛\n";// LZ=1;// } cout<<"现在是睡觉时间:\n"; cout<<"请选择:"; cout<<"1.听课 2.关掉极域,玩dino\n"; cout<<"1.睡觉 2.做题 3.玩游戏\n"; while(kbhit())Get=getch(); Get=getch(); system("cls"); if(Get=='1'){ if(a<=5){ cout<<"你没有听懂,你感觉你白学了。\n"; stu.happy-=rng()%10+6; if(rng()%10<=2){ cout<<"你做了被老帅猎杀的噩梦\n"; Sleep(666); }else if(a<=25-stu.cut/5){ cout<<"你没有听懂,你很懵。\n"; stu.happy-=rng()%5+3; Sleep(666); }else if(a<=80){ cout<<"你听懂了一点。\n"; stu.cut+=rng()%2+2; Sleep(666); stu.touch+=rng()%2; cout<<"你感觉你的背后时刻有一双眼睛注视着你\n"; Sleep(666); stu.touch+=rng()%4+3; stu.happy-=rng()%5+4; }else if(rng()%10<=6){ cout<<"你做了一个AKIOI的好梦\n"; Sleep(666); cout<<"你感觉你飞起来了\n"; Sleep(666); stu.touch-=rng()%3+2; stu.happy+=rng()%7+5; }else if(rng()%10<=8){ cout<<"你发现你睡得头昏脑胀\n"; Sleep(666); stu.touch-=rng()%2+1; stu.cut-=rng()%3+3; }else{ cout<<"你完全听懂了,你好超标!\n"; Sleep(666); stu.happy+=rng()%3+1; stu.cut+=rng()%5+5; stu.touch+=rng()%2+2; cout<<"你在梦中获得了AKIOI秘籍\n"; Sleep(666); stu.cut+=rng()%10+10; stu.happy+=rng()%5+4; } }else if(Get=='2'){ if(a<=40){ cout<<"你只被发现关掉了极域。\n"; stu.happy+=rng()%3; Sleep(666); }else if(a<=75){ cout<<"你被发现玩游戏。\n"; } else if(Get=='2'){ int sum=max(a/4-30+stu.cut,0)/6; cout<<"你做出了"<<sum<<"道题。\n"; Sleep(666); stu.happy-=rng()%3+1; stu.cut-=rng()%3+sum/2; if(sum>=6){ cout<<"你感到非常自豪!\n"; Sleep(666); up_play(); stu.happy+=rng()%3+sum-4; }else{ cout<<"老帅没有发现。\n"; cout<<"你度过了一段平凡的时间。\n"; Sleep(666); stu.happy+=rng()%10+10; stu.touch-=rng()%3+1; } stu.happy+=max(int(rng()%2+sum-2),0); } }else if(Get=='3'){ if(a<=70-stu.touch){ cout<<"你被家长发现玩游戏。\n"; Sleep(666); stu.happy-=rng()%6+6; stu.touch+=rng()%3+2; }else{ cout<<"家长没有发现。\n"; Sleep(666); stu.happy+=rng()%10+8; stu.touch-=rng()%4+2; stu.cut-=rng()%3+2; } }else{ cout<<"你TM连键盘都不会用,给我去死吧——CZS",exit(0); } system("cls");}void Do_1(){ int a=rng()%100; if(a<=80){ cout<<"现在是做题时间:\n"; cout<<"请选择:"; cout<<"1.玩游戏 2.做题\n"; while(kbhit())Get=getch(); Get=getch(); system("cls"); if(Get=='1'){ if(a<=70-stu.touch){ cout<<"你被CZS发现玩游戏。\n"; Sleep(666); up_play(); }else{ cout<<"老帅没有发现。\n"; Sleep(666); stu.happy+=rng()%10+8; stu.touch-=rng()%4+2; } }else if(Get=='2'){ int sum=max(a/4-30+stu.cut,0)/4; cout<<"你做出了"<<sum<<"道题。\n"; Sleep(666); stu.happy-=rng()%3+1; stu.cut-=rng()%3+sum/2; if(sum<=1){ un_study(); }else if(sum>=6){ cout<<"你感到非常自豪!\n"; Sleep(666); stu.happy+=rng()%3+sum-4; }else{ cout<<"你度过了一段平凡的时间。\n"; Sleep(666); stu.happy+=rng()%2+sum-2; } }else{ cout<<"你TM连键盘都不会用,给我去死吧——CZS",exit(0); } }else{ Do_1(); }system("cls");}void Do_0(){ int a=rng()%100; int b=rng()%10; if(b<=8){ cout<<"老帅在上课。\n"; cout<<"请选择:\n"; cout<<"1.听课 2.关掉极域,玩dino"; while(kbhit())Get=getch(); Get=getch(); system("cls"); if(Get=='1'){ if(a<=5){ cout<<"你没有听懂,你感觉你白学了。\n"; stu.happy-=rng()%10+6; Sleep(666); }else if(a<=50-stu.cut/3){ cout<<"你没有听懂,你很懵。\n"; stu.happy-=rng()%5+3; Sleep(666); }else if(a<=90-stu.cut/4){ cout<<"你听懂了一点。\n"; Sleep(666); stu.happy-=rng()%3+1; stu.cut+=rng()%2+2; stu.touch+=rng()%2; }else{ cout<<"你完全听懂了,你好超标!\n"; Sleep(666); stu.happy+=rng()%2+2; stu.cut+=rng()%5+5; stu.touch+=rng()%4+1; } }else if(Get=='2'){ if(a<=25+stu.touch/2){ cout<<"你只被发现关掉了极域。\n"; stu.happy-=rng()%3; stu.touch-=rng()%2+1; Sleep(666); }else if(a<=75-stu.touch/2){ cout<<"你被发现玩游戏。\n"; Sleep(666); up_play(); }else{ cout<<"老帅没有发现。\n"; Sleep(666); stu.happy+=rng()%8+8; stu.touch-=rng()%4+2; } }else{ cout<<"你TM连键盘都不会用,给我去死吧——CZS",exit(0); } }else{ Do_1(); }system("cls");}int main(){ cout<<"恐怖CZS模拟器\n"; Sleep(1000); cout<<"小素素出品\n"; Sleep(1000);// cout<<"恐怖CZS模拟器\n";// Sleep(1000);// cout<<"小素素出品\n";// Sleep(1000);// cout<<"按任意键继续\n";// while(kbhit())Get=getch();// Get=getch();// system("cls");// cout<<"背景\n";// Sleep(1000);// cout<<"你来到了恐怖鱼糕,在恐怖CZS的监视的下,你需要活过10天!\n";// Sleep(1000);// cout<<"以下是各种属性:\n";// Sleep(1000);// cout<<"疯狂吵闹:声音非常大,可能会吸引CZS和LZ,但是对了解奇葩内容有一定帮助\n";// Sleep(1000);// cout<<"超标怪:打代码非常强,同时喜欢装蒟蒻,可以暂时吸引住CZS\n";// Sleep(1000);// cout<<"厕所战神:一天上100次厕所,每次上1秒钟,可以侦查CZS\n";// Sleep(1000);// cout<<"游戏家:特别爱打游戏,会拉别人打游戏,并可能被CZS和LZ发现,可以增加别人的愉悦值\n";// Sleep(1000);// cout<<"按任意键继续\n";// while(kbhit())Get=getch();// Get=getch();// cout<<"以下是你的系统:\n";// Sleep(1000);// cout<<"切题能力:切题能力会随着认真上课而提升,太高或太低会引起CZS注意,太低有概率被淘汰成猪肉。\n";// Sleep(1000); // cout<<"愉悦值:愉悦值过低会导致其他能力下降,过高会导致敏感值下降!\n";// Sleep(1000);// cout<<"敏感值:敏感值影响着你发现老师的概率,敏感值也可用于对题意或题目算法理解的敏感。\n";// Sleep(1000);// cout<<"见识量:见识可以增加你的脑容量,在有些时候非常有用,还有概率获得正面属性。\n" ; cout<<"按任意键继续\n"; while(kbhit())Get=getch(); Get=getch(); system("cls"); cout<<"背景\n"; Sleep(1000); cout<<"你来到了恐怖鱼糕,在恐怖CZS的监视的下,你需要活过10天!\n"; Sleep(1000); cout<<"以下是各种属性:\n"; Sleep(1000); cout<<"疯狂吵闹:声音非常大,可能会吸引CZS和LZ,但是对了解奇葩内容有一定帮助\n"; Sleep(1000); cout<<"超标怪:打代码非常强,同时喜欢装蒟蒻,可以暂时吸引住CZS\n"; Sleep(1000); cout<<"厕所战神:一天上100次厕所,每次上1秒钟,可以侦查CZS\n"; Sleep(1000); cout<<"游戏家:特别爱打游戏,会拉别人打游戏,并可能被CZS和LZ发现,可以增加别人的愉悦值\n"; Sleep(1000); cout<<"按任意键继续\n"; cout<<"请选择难度:1.简单 2.普通 3.困难 4.专家 (建议选择普通) \n"; while(kbhit())Get=getch(); Get=getch(); cout<<"以下是你的系统:\n"; Sleep(1000); cout<<"切题能力:切题能力会随着认真上课而提升,太高或太低会引起CZS注意,太低有概率被淘汰成猪肉。\n"; Sleep(1000); cout<<"愉悦值:愉悦值过低会导致其他能力下降,过高会导致敏感值下降!\n"; Sleep(1000); cout<<"敏感值:敏感值影响着你发现老师的概率,敏感值也可用于对题意或题目算法理解的敏感。\n"; Sleep(1000); cout<<"见识量:见识可以增加你的脑容量,在有些时候非常有用,还有概率获得正面属性。\n" cout<<"按任意键继续\n"; while(kbhit())Get=getch(); Get=getch(); int N; if(Get=='1')stu.cut=30,stu.happy=65,stu.touch=20,N=6; else if(Get=='2')stu.cut=25,stu.happy=50,stu.touch=15,N=10; else if(Get=='3')stu.cut=20,stu.happy=40,stu.touch=12,N=15; else if(Get=='4')stu.cut=15,stu.happy=30,stu.touch=10,N=20; else stu.cut=1,stu.happy=1,stu.touch=1,N=10; system("cls"); for(int i=1;i<=10;i++){ for(int i=1;i<=N;i++){ for(int j=0;j<=5;j++){ un_happy(); cout<<"Day"<<i<<" "<<TIME[j]<<'\n'; cout<<"切题能力:"<<stu.cut<<" 愉悦值:"<<stu.happy<<" 敏感值:"<<stu.touch<<'\n'; if(j==0)Do_0(); if(j==1)Do_0(); if(j==2)Do_0(); if(j==2)Do_1(); if(j==3)Do_0(); if(j==4)Do_0(); if(j==5)Do_0(); if(j==4)Do_1(); if(j==5)Do_2(); stu.cut-=rng()%2; system("cls"); }stu.happy+=rng()%3+2; }stu.happy+=rng()%5+3; stu.cut+=rng()%3; } cout<<"你活了下来,吃掉了老帅和所有失败的玩家!你成为了CZS!你的得分为:"<<stu.cut*stu.happy*stu.touch<<"!超标怪"; return 0;}
```