代码### 代码吧!
团主是重庆的~
(欢迎陌生人加入)(欢迎小学、中学生加入)(欢迎加入)

代码吧的创办者是@[majkgww](https://www.luogu.com.cn/user/1959706)。
代码### 代码吧!
[](https://www.luogu.com.cn/team/132004)
不允许随便更改组别与备注!
**请管理员不要在团队内出题,先在个人题库中出题。**
::::info[比赛]{open}
比赛详情请见[团队比赛页面](https://www.luogu.com.cn/team/132004/contest)。
**你也可以申请办比赛,需向团主发送私信。**
|比赛|描述|下一场比赛/进行中比赛|
|:-:|:-:|:-:|
|Div.2|普通比赛|TBD|
|Div.1|稍难比赛|TBD|
|DDD|选拔赛|[【DDD-S1】S1赛季选拔赛 & 十月月赛](https://www.luogu.com.cn/contest/365509#description)|
|DMB|巅峰赛|TBD|
::::
::::info[组别与成员]
:::info[组别]
|组别 |介绍 |
|:-:|:-:|
|K |吉祥物 |
|Pro |出题人 |
|Data|做数据点|
|A |DR排名靠前 |
|B |普通 |
:::
:::info[成员]
|成员|Rating|
|:-:|:-:|
|yuqiuyi16|$5.5$|
|qslcy16|$0$|
|hjchenyr|$5.5$|
|ScorpioAntares|$5.5$|
|yuanhaoran111111|$5.5$|
|lhqhans0106|$5.5$|
|wsy319997|$5.5$|
|cyr_2014|$1.4$|
|majkzzy|$0$|
|YuanTu1013|$0$|
|abcd32L|$0$|
|Eric34|$0$|
|zhangruibo153|$4.12$|
|xigua729|$3.4$|
|zhao_xinyu|$0$|
|czh2015|$0$|
|\_link\_|$0$|
|grx_01|$0$|
|zyz677|$0$|
|jkxyh|$1$|
|\_\_yqy__|$0$|
|gupengchen|$1.5$|
|linxiran_0630|$2.6$|
|zizineng|$0$|
:::
::::
C++#include<bits/stdc++.h>
#include<conio.h>
#include<windows.h>
using namespace std;
int f=0,w=0,mm=0,ah=100,at=100,ap=100,day=1;
int main(){
cout<<"WELCOME!\n";
cout<<"PLEASE PRESS 'a' TO GET SOME FOODS, PRESS 'b' TO GET SOME WATER!\n";
cout<<"3\n";
sleep(1);
cout<<"2\n";
sleep(1);
cout<<"1\n";
sleep(1);
cout<<"START!\n";
for(int i=1;i<=600000;i++){
if(_kbhit()){
char c=getch();
if(c=='a'){
f++;
}else if(c=='b'){
w++;
}
}
sleep(0.01);
}
sleep(1);
system("pause");
while(at>0 && ah>0 && ap>0){
system("cls");
cout<<(ah>=51 ? "NOT HUNGRY" : (ah<=30 ? "VERY HUNGRY" : "HUNGRY"))<<" | "<<(at>=51 ? "NOT THIRSTY" : (at<=30 ? "VERY THIRSTY" : "THIRSTY"))<<" | "<<(at>=51 ? "HEALTHY" : (at<=20 ? "DIEING" : "ILL"))<<"\n";
cout<<"FOOD:"<<f<<" WATER:"<<w<<" MEDICINE:"<<mm<<"\n";
int yy1,yy2,yy3;
cout<<"DO YOU NEED SOME FOOD? (INPUT 1 OR 0)";
cin>>yy1;
if(yy1){
if(!f){
cout<<"YOU DO NOT HAVE ENOUGH FOOD.\n";
}else{
f--;
ah+=5;
}
}
cout<<"DO YOU NEED SOME DRINK? (INPUT 1 OR 0)";
cin>>yy2;
if(yy2){
if(!w){
cout<<"YOU DO NOT HAVE ENOUGH DRINK.\n";
}else{
w--;
at+=5;
}
}
cout<<"DO YOU NEED SOME MEDICINE? (INPUT 1 OR 0)";
cin>>yy3;
if(yy3){
if(!mm){
cout<<"YOU DO NOT HAVE ENOUGH MEDICINE.\n";
}else{
mm--;
ap=100;
}
}
system("pause");
system("cls");
srand(time(0));
int r=rand()%10+1;
if(r<=5){
cout<<"A PERSON ROB YOU!\n";
srand(time(0));
int fj=rand()%5+1;
srand(time(0));
int wj=rand()%5;
f-=fj;
w-=wj;
srand(time(0));
mm-=rand()%2;
if(f<0)f=0;
if(w<0)w=0;
if(mm<0)mm=0;
}
system("pause");
system("cls");
cout<<(ah>=51 ? "NOT HUNGRY" : (ah<=30 ? "VERY HUNGRY" : "HUNGRY"))<<" | "<<(at>=51 ? "NOT THIRSTY" : (at<=30 ? "VERY THIRSTY" : "THIRSTY"))<<" | "<<(at>=51 ? "HEALTHY" : (at<=20 ? "DIEING" : "ILL"))<<"\n";
cout<<"DO YOU WANT TO DO SOME ADVANTURE? (INPUT 1 OR 0)";
int yyy;
cin>>yyy;
if(yyy){
srand(time(0));
ah-=rand()%10;
srand(time(0));
at-=rand()%10;
srand(time(0));
at-=rand()%30;
srand(time(0));
f+=rand()%10;
srand(time(0));
w+=rand()%10;
srand(time(0));
mm+=rand()%2;
}
cout<<".";
sleep(0.5);
cout<<".";
sleep(0.5);
cout<<".";
sleep(0.5);
ah-=8;
at-=8;
ap-=1;
}
system("cls");
cout<<"DIE\n";
system("pause");
return 0;
}