请用Dev-C++运行,工具——编译器选项——勾选“编译时加入以下命令”,并加入-std=c++14

#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#define cls system("cls")
#define et cout<<endl
#define pause system("pause")
using namespace std;
mt19937 myrng(time(0));
int rd(int l,int r){
	return myrng()%(r-l+1)+l;
}
string to_string(auto n){
	if(n==0)return "0";
	string t;
	bool f=false;
	if(n<0){
		f=true;
		n=-n;
	}
	while(n){
		t=char(n%10+'0')+t;
		n/=10;
	}
	return ((f)?"-":"")+t;
}
void pr(string s,int t=25){
	for(int i=0;i<s.size();i++){
		cout<<s[i];
		Sleep(t);
	}
}
void cp(string s,int fc=15,int bc=0,bool slow=0,int t=25,int _setw=0){
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|bc*16|FOREGROUND_INTENSITY|fc);
    if(slow)pr(s,t);
	else cout<<left<<setw(_setw)<<s;
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|7);
    return;
}
inline int ___ti(float a) {
	return ((int)(a*10+5))/10;
}
void Setpos(float x,float y){
	COORD pos;
	pos.X=___ti(y*4)/2;
	pos.Y=___ti(x);
	SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}
int star_5_c=0,star_4_c=0,choose_count,ttttt[]={0,0,0,3,5,6};
int star_5_cWQ,star_4_cWQ,star_5_cCZ,star_4_cCZ,choose_countWQ,choose_countCZ;
int gailu[3][100]={{0,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,
	60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,
	60,60,60,60,60,60,660,1260,1860,2460,3060,3660,4260,4860,5460,6060,6660,7260,7860,8460,9060,9660,10000},
	{0,160,160,160,160,160,2160,4160,6160,8160,10160}};
bool dabaodi5,dabaodi4;
int choose_star(){//4:1.6% 5:0.6%
	int n=myrng()%10000;
	choose_count++,star_5_c++,star_4_c++;
	star_5_c=min(90,star_5_c),star_4_c=min(10,star_4_c);
	if(n<=gailu[0][star_5_c+1]){star_5_c=0;return 5;}
	if(n<=gailu[1][star_4_c+1]){star_4_c=0;return 4;}
	return 3;
}
int choose_starWQ(){//4:1.6% 5:0.6%
	int n=myrng()%10000;
	choose_countWQ++,star_5_cWQ++,star_4_cWQ++;
	star_5_cWQ=min(90,star_5_cWQ),star_4_cWQ=min(10,star_4_cWQ);
	if(n<=gailu[0][star_5_cWQ+1]){star_5_cWQ=0;return 5;}
	if(n<=gailu[1][star_4_cWQ+1]){star_4_cWQ=0;return 4;}
	return 3;
}
int choose_starCZ(){//4:1.6% 5:0.6%
	int n=myrng()%10000;
	choose_countCZ++,star_5_cCZ++,star_4_cCZ++;
	star_5_cCZ=min(90,star_5_cCZ),star_4_cCZ=min(10,star_4_cCZ);
	if(n<=gailu[0][star_5_cCZ+1]){star_5_cCZ=0;return 5;}
	if(n<=gailu[1][star_4_cCZ+1]){star_4_cCZ=0;return 4;}
	return 3;
}
vector<string>_3x,_4x,cz5x,xd5x,cz4x,xd4x,wcz5x,wxd4x,wxd5x;
string x4x[3],x5x,wqx4x[5],wqx5x[2],dg5x;
int dgz;
vector<pair<int,string> >get_JS(int n){
	vector<pair<int,string> >ans;
	for(int i=1;i<=n;i++){
		switch(choose_star()){
			case 3:{
				ans.push_back({3,_3x[myrng()%_3x.size()]});
				break;
			}
			case 4:{
				if(dabaodi4||myrng()&1){
					ans.push_back({4,x4x[myrng()%3]});
					dabaodi4=false;
				}else{
					string t;
					while(1){
						int tt=myrng()%(_4x.size()+cz4x.size());
						if(tt>=_4x.size())t=cz4x[tt-_4x.size()];
						else t=_4x[tt];
						bool f=false;
						for(int i=0;i<3;i++){
							if(x4x[i]==t){
								f=true;break;
							}
						}
						if(f)continue;
						break;
					}
					ans.push_back({4,t});
					dabaodi4=true;	
				}
				break;
			}
			case 5:{
				if(dabaodi5||myrng()&1){
					ans.push_back({5,x5x});
					dabaodi5=false;
				}else{
					ans.push_back({5,cz5x[myrng()%cz5x.size()]});
					dabaodi5=true;
				}
				break;
			}
		}
	}
	return ans;
}
vector<pair<int,string> >get_CZ(int n){
	vector<pair<int,string> >ans;
	for(int i=1;i<=n;i++){
		switch(choose_star()){
			case 3:{
				ans.push_back({3,_3x[myrng()%_3x.size()]});
				break;
			}
			case 4:{
				string t;
				int tt=myrng()%(_4x.size()+cz4x.size());
				if(tt>=_4x.size())t=cz4x[tt-_4x.size()];
				else t=_4x[tt];
				ans.push_back({4,t});
				break;
			}
			case 5:{
				string t;
				int tt=myrng()%(cz5x.size()+wcz5x.size());
				if(tt>=cz5x.size())t=wcz5x[tt-cz5x.size()];
				else t=cz5x[tt];
				ans.push_back({5,t});
				dabaodi5=true;
				break;
			}
		}
	}
	return ans;
}
/*vector<string>_3x,_4x,cz5x,xd5x;
string x4x[3],x5x,wqx4x[5],wqx5x[2],dg5x;
int dgz;*/
bool dabaodi4wq,dabaodi5wq;
int mdz;
vector<pair<int,string> >get_WQ(int n){
	vector<pair<int,string> >ans;
	for(int i=1;i<=n;i++){
		switch(choose_starWQ()){
			case 3:{
				ans.push_back({3,_3x[myrng()%_3x.size()]});
				break;
			}
			case 4:{
				if(dabaodi4wq||myrng()%4){
					ans.push_back({4,wqx4x[myrng()%5]});
					dabaodi4wq=false;
				}else{
					string t;
					while(1){
						int tt=myrng()%(_4x.size()+cz4x.size());
						if(tt>=_4x.size())t=cz4x[tt-_4x.size()];
						else t=_4x[tt];
						bool f=false;
						for(int i=0;i<3;i++){
							if(wqx4x[i]==t){
								f=true;break;
							}
						}
						if(f)continue;
						break;
					}
					ans.push_back({4,t});
					dabaodi4wq=true;
				}
				break;
			}
			case 5:{
				if(mdz||dabaodi5wq||myrng()%4){
					string t;
					if(mdz==1)t=dg5x;
					else t=wqx5x[myrng()%2];
					if(t==dg5x)mdz=0;
					else mdz++;
					ans.push_back({5,t});
					dabaodi5wq=false;
				}else{
					mdz++;
					ans.push_back({5,wcz5x[myrng()%wcz5x.size()]});
					dabaodi5wq=true;
				}
				if(dg5x=="wuwuwu")mdz=0;
				break;
			}
		}
	}
	return ans;
}
void print(vector<pair<int,string> >a){
	sort(a.begin(),a.end());
	for(int i=a.size()-1;i>=0;i--){
		cp(a[i].second,ttttt[a[i].first]);et;
	}
}
bool cmp(pair<string,int>a,pair<string,int>b){
	return a.second>b.second;
}
namespace GenshinImpact{
	vector<string>_3x,_4x,cz5x,xd5x,cz4x,xd4x,wcz5x,wxd4x,wxd5x;
	vector<pair<int,string> >qkjl;
	map<string,int>qkjj,kkksb03;
	int ys,jczy,wzdxh;
	void init(){
		_3x.clear(),_4x.clear(),cz5x.clear(),xd5x.clear(),xd4x.clear(),wcz5x.clear(),wxd4x.clear(),wxd5x.clear();
		_3x.push_back("黑缨枪");
		_3x.push_back("黎明神剑");
		_3x.push_back("弹弓");
		_3x.push_back("冷刃");
		_3x.push_back("飞天御剑");
		_3x.push_back("黎明神剑");
		_3x.push_back("沐浴龙血的剑");
		_3x.push_back("铁影阔剑");
		_3x.push_back("以理服人");
		_3x.push_back("神射手之誓");
		_3x.push_back("鸦羽弓");
		_3x.push_back("魔导绪论");
		_3x.push_back("翡玉法球");
		_3x.push_back("讨龙英杰谭");
		for(string t:_3x)kkksb03[t]=3;
		///
		//x4md 
		_4x.push_back("班尼特");
		_4x.push_back("砂糖");
		_4x.push_back("米卡");
		_4x.push_back("罗莎莉亚");
		_4x.push_back("迪奥娜");
		_4x.push_back("菲谢尔");
		_4x.push_back("诺艾尔");
		_4x.push_back("芭芭拉");
		_4x.push_back("雷泽");
		//x4ly
		_4x.push_back("行秋");
		_4x.push_back("香菱");
		_4x.push_back("嘉明");
		_4x.push_back("瑶瑶");
		_4x.push_back("云堇");
		_4x.push_back("烟绯");
		_4x.push_back("辛焱");
		_4x.push_back("凝光");
		_4x.push_back("重云");
		_4x.push_back("北斗");
		//x4dq
		_4x.push_back("九条裟罗");
		_4x.push_back("托马");
		_4x.push_back("早柚");
		_4x.push_back("绮良良");
		_4x.push_back("鹿野院平藏");
		_4x.push_back("久岐忍");
		_4x.push_back("五郎");
		//x4xm
		_4x.push_back("柯莱");
		_4x.push_back("赛索斯");
		_4x.push_back("卡维");
		_4x.push_back("珐露珊");
		_4x.push_back("莱依拉");
		_4x.push_back("坎蒂丝");
		_4x.push_back("多莉");
		//x4fd
		_4x.push_back("夏沃蕾");
		_4x.push_back("夏洛蒂");
		_4x.push_back("菲米尼");
		_4x.push_back("琳妮特");
		//x4nt 
		_4x.push_back("卡齐娜");
		_4x.push_back("欧洛仑");
		for(string t:_4x)kkksb03[t]=4;
		///
		cz5x.push_back("七七");
		cz5x.push_back("刻晴");
		cz5x.push_back("琴");
		cz5x.push_back("莫娜");
		cz5x.push_back("迪卢克");
		cz5x.push_back("迪西雅");
		cz5x.push_back("提那里");
		for(string t:cz5x)kkksb03[t]=5;
		//
		//x5md
		xd5x.push_back("可莉");
		xd5x.push_back("阿贝多");
		xd5x.push_back("优菈");
		xd5x.push_back("温迪");
		//x5ly
		xd5x.push_back("甘雨");
		xd5x.push_back("胡桃");
		xd5x.push_back("魈");
		xd5x.push_back("白术");
		xd5x.push_back("夜兰");
		xd5x.push_back("闲云");
		xd5x.push_back("申鹤");
		xd5x.push_back("钟离");
		//x5dq
		xd5x.push_back("神里绫华");
		xd5x.push_back("神里绫人");
		xd5x.push_back("宵宫");
		xd5x.push_back("雷电将军");
		xd5x.push_back("枫原万叶");
		xd5x.push_back("千织");
		xd5x.push_back("八重神子");
		xd5x.push_back("荒泷一斗");
		xd5x.push_back("珊瑚宫心海");
		//x5xm
		xd5x.push_back("赛诺");
		xd5x.push_back("艾尔海森");
		xd5x.push_back("妮露");
		xd5x.push_back("纳西妲");
		xd5x.push_back("流浪者");//史
		//x5fd
		xd5x.push_back("林尼");
		xd5x.push_back("那维莱特");
		xd5x.push_back("莱欧斯利");
		xd5x.push_back("芙宁娜");
		xd5x.push_back("克洛琳德");
		xd5x.push_back("艾梅莉埃");
		xd5x.push_back("希格雯");
		xd5x.push_back("娜维娅");
		//x5nt
		xd5x.push_back("玛拉妮");
		xd5x.push_back("基尼奇");
		xd5x.push_back("希诺宁");
		xd5x.push_back("恰斯卡");
		xd5x.push_back("玛威卡");
		xd5x.push_back("茜特菈莉");
		//x5zd
		xd5x.push_back("达达利亚");
		xd5x.push_back("阿蕾奇诺");
		for(string t:xd5x)kkksb03[t]=5;
		///wq
		//cz4x
		cz4x.push_back("匣里龙吟");
		cz4x.push_back("祭礼剑");
		cz4x.push_back("笛剑");
		cz4x.push_back("西风剑");
		cz4x.push_back("钟剑");
		cz4x.push_back("雨裁");
		cz4x.push_back("祭礼大剑");
		cz4x.push_back("西风大剑");
		cz4x.push_back("祭礼弓");
		cz4x.push_back("绝弦");
		cz4x.push_back("弓藏");
		cz4x.push_back("西风猎弓");
		cz4x.push_back("流浪乐章");
		cz4x.push_back("祭礼残章");
		cz4x.push_back("西风秘典");
		cz4x.push_back("昭心");
		cz4x.push_back("匣里灭辰");
		cz4x.push_back("西风长枪");
		for(string t:cz4x)kkksb03[t]=4;
		//xd4x
		xd4x.push_back("弥坚骨");
		xd4x.push_back("镇山之钉");
		xd4x.push_back("船坞长剑");
		xd4x.push_back("便携动力锯");
		xd4x.push_back("测距规");
		xd4x.push_back("勘探钻机");
		xd4x.push_back("西福斯的月光");
		xd4x.push_back("玛海菈的水色");
		xd4x.push_back("流浪的晚星");
		xd4x.push_back("恶王丸");
		xd4x.push_back("曚云之月");
		xd4x.push_back("断浪长鳍");
		xd4x.push_back("幽夜华尔兹");
		xd4x.push_back("暗巷闪光");
		xd4x.push_back("暗巷猎手");
		xd4x.push_back("暗巷的酒与诗");
		xd4x.push_back("千岩古剑");
		xd4x.push_back("千岩长枪");
		for(string t:xd4x)kkksb03[t]=4;
		//wcz5x
		wcz5x.push_back("天空之刃");
		wcz5x.push_back("天空之傲");
		wcz5x.push_back("天空之翼");
		wcz5x.push_back("天空之卷");
		wcz5x.push_back("天空之脊");
		wcz5x.push_back("风鹰剑");
		wcz5x.push_back("狼的末路");
		wcz5x.push_back("阿莫斯之弓");
		wcz5x.push_back("和璞鸢");
		wcz5x.push_back("四风原典");
		for(string t:wcz5x)kkksb03[t]=5;
		//wxd5x
		wxd5x.push_back("岩峰巡歌");
		wxd5x.push_back("山王长牙");
		wxd5x.push_back("冲浪时光");
		wxd5x.push_back("柔灯挽歌");
		wxd5x.push_back("赦罪");
		wxd5x.push_back("白雨心弦");
		wxd5x.push_back("赤月之形");
		wxd5x.push_back("有乐御簾切");
		wxd5x.push_back("鹤鸣余音");
		wxd5x.push_back("裁断");
		wxd5x.push_back("静水流涌之辉");
		wxd5x.push_back("万世流涌大典");
		wxd5x.push_back("金流监督");
		wxd5x.push_back("最初的大魔术");
		wxd5x.push_back("碧落之珑");
		wxd5x.push_back("苇海信标");
		wxd5x.push_back("裁叶萃光");
		wxd5x.push_back("图莱杜拉的回忆");
		wxd5x.push_back("千夜浮梦");
		wxd5x.push_back("圣显之钥");
		wxd5x.push_back("赤沙之杖");
		wxd5x.push_back("猎人之径");
		wxd5x.push_back("若水");
		wxd5x.push_back("波乱月白经津");
		wxd5x.push_back("神乐之真意");
		wxd5x.push_back("息灾");
		wxd5x.push_back("赤角石溃杵");
		wxd5x.push_back("冬极白星");
		wxd5x.push_back("不灭月华");
		wxd5x.push_back("薙草之稻光");
		wxd5x.push_back("雾切之回光");
		wxd5x.push_back("飞雷之弦振");
		wxd5x.push_back("苍古自由之誓");
		wxd5x.push_back("松籁响起之时");
		wxd5x.push_back("终末嗟叹之诗");
		wxd5x.push_back("磐岩结绿");
		wxd5x.push_back("护摩之杖");
		wxd5x.push_back("斫峰之刃");
		wxd5x.push_back("无工之剑");
		wxd5x.push_back("尘世之锁");
		wxd5x.push_back("贯虹之槊");
		for(string t:wxd5x)kkksb03[t]=5;
		////
		
		ys=500000;
	}
	void chooseJS(){
		while(1){
			cls;
			cp("抽卡     ",3);
			cp("原石:"+to_string(ys),6);
			cp("     无主的星辉:"+to_string(wzdxh),5);
			cp("     纠缠之缘:"+to_string(jczy),6);et;
			cp("1.单抽 2.10连抽 3.选择目标 4.兑换 5.抽卡记录 0.退出");et;
			string s;cin>>s;
			vector<pair<int,string> >ans;
			if(s=="1"){
				if(jczy<1){
					if(ys<160){
						cp("原石不足",4);
						Sleep(2000);
						continue;
					}
					ys-=160,jczy++;
				}
				jczy--;
				ans=get_JS(1);
			}if(s=="2"){
				if(jczy<10){
					if(ys<(10-jczy)*160){
						cp("原石不足",4);
						Sleep(2000);
						continue;
					}
					ys-=(10-jczy)*160,jczy=10;
				}
				jczy-=10;
				ans=get_JS(10);
			}if(s=="5"){
				cls;
				cp("共抽"+to_string(choose_count)+"次",3);et;et;et;
				for(int i=0;i<qkjl.size();i++){
					cp(qkjl[i].second,ttttt[qkjl[i].first]);et;
				}et;et;
				cp("共获得",3);et;
				vector<pair<string,int> >kkks;
				for(pair<string,int>kkk:qkjj)
					kkks.push_back({kkk.first,kkksb03[kkk.first]});
				sort(kkks.begin(),kkks.end(),cmp);
				for(pair<string,int>kkk:kkks){
					cp(kkk.first+"*"+to_string(qkjj[kkk.first]),ttttt[kkk.second]);et;
				}
				pause;
			}if(s=="0")return;
			if(s=="4"){
				cls;
				cp("兑换     ",3);
				cp("原石:"+to_string(ys),6);
				cp("     无主的星辉:"+to_string(wzdxh),5);et;
				cp("1.星辉兑换 2.原石兑换 0.退出");et;
				cin>>s;
				if(s=="0")continue; 
				if(s=="1"){
					cls;
					cp("纠缠之缘(5*无主的星辉)(最多兑换"+to_string(wzdxh/5)+"个)",6);et;
					int n;cin>>n;
					n=min(max(n,0),wzdxh/5);
					wzdxh-=n*5;
					jczy+=n;
				}if(s=="2"){
					cls;
					cp("纠缠之缘(160*原石)(最多兑换"+to_string(ys/160)+"个)",6);et;
					int n;cin>>n;
					n=min(max(n,0),ys/160);
					ys-=n*160;
					jczy+=n;
				}
			}
			int eee=0;
			if(ans.size()){
				for(int i=0;i<ans.size();i++){
					qkjl.push_back(ans[i]);
					for(string s:cz4x)
						if(ans[i].second==s)
							eee+=2;
					if(qkjj[ans[i].second]){
						for(string s:_4x)
							if(ans[i].second==s)
								if(qkjj[ans[i].second]>7)eee+=5;
								else eee+=2;
						for(string s:cz5x)
							if(ans[i].second==s)
								if(qkjj[ans[i].second]>7)eee+=25;
								else eee+=10;
						for(string s:xd5x)
							if(ans[i].second==s)
								if(qkjj[ans[i].second]>7)eee+=25;
								else eee+=10;
					}
					qkjj[ans[i].second]++;
				}
			}
			cls;
			print(ans);
			if(ans.size()&&eee){
				et;et;
				cp("额外获得"+to_string(eee)+"个无主的星辉",6);et;
				wzdxh+=eee;
			}
			pause;
		}
	}
	void chooseWQ(){
		while(1){
			cls;
			cp("抽卡     ",3);
			cp("原石:"+to_string(ys),6);
			cp("     无主的星辉:"+to_string(wzdxh),5);
			cp("     纠缠之缘:"+to_string(jczy),6);et;
			cp("1.单抽 2.10连抽 3.选择目标 4.兑换 5.抽卡记录 6.定轨"+(dg5x!="wuwuwu"?"("+dg5x+")":"")+"(命定值"+to_string(mdz)+"/1) 0.退出");et;
			string s;cin>>s;
			vector<pair<int,string> >ans;
			if(s=="1"){
				if(jczy<1){
					if(ys<160){
						cp("原石不足",4);
						Sleep(2000);
						continue;
					}
					ys-=160,jczy++;
				}
				jczy--;
				ans=get_WQ(1);
			}if(s=="2"){
				if(jczy<10){
					if(ys<(10-jczy)*160){
						cp("原石不足",4);
						Sleep(2000);
						continue;
					}
					ys-=(10-jczy)*160,jczy=10;
				}
				jczy-=10;
				ans=get_WQ(10);
			}if(s=="5"){
				cls;
				cp("共抽"+to_string(choose_count)+"次",3);et;et;et;
				for(int i=0;i<qkjl.size();i++){
					cp(qkjl[i].second,ttttt[qkjl[i].first]);et;
				}et;et;
				cp("共获得",3);et;
				vector<pair<string,int> >kkks;
				for(pair<string,int>kkk:qkjj)
					kkks.push_back({kkk.first,kkksb03[kkk.first]});
				sort(kkks.begin(),kkks.end(),cmp);
				for(pair<string,int>kkk:kkks){
					cp(kkk.first+"*"+to_string(qkjj[kkk.first]),ttttt[kkk.second]);et;
				}
				pause;
			}if(s=="0")return;
			if(s=="4"){
				cls;
				cp("兑换     ",3);
				cp("原石:"+to_string(ys),6);
				cp("     无主的星辉:"+to_string(wzdxh),5);et;
				cp("1.星辉兑换 2.原石兑换 0.退出");et;
				cin>>s;
				if(s=="0")continue; 
				if(s=="1"){
					cls;
					cp("纠缠之缘(5*无主的星辉)(最多兑换"+to_string(wzdxh/5)+"个)",6);et;
					int n;cin>>n;
					n=min(max(n,0),wzdxh/5);
					wzdxh-=n*5;
					jczy+=n;
				}if(s=="2"){
					cls;
					cp("纠缠之缘(160*原石)(最多兑换"+to_string(ys/160)+"个)",6);et;
					int n;cin>>n;
					n=min(max(n,0),ys/160);
					ys-=n*160;
					jczy+=n;
				}
			}if(s=="6"){
				cls;
				cp("选择:",3);et;
				cp("1."+wqx5x[0]+"\n2."+wqx5x[1],6);et;
				cp("3.取消\n0.退出");et;
				int n;cin>>n;n--;
				string kkksc=dg5x;
				if(n==-1)continue;
				if(n==2)dg5x="wuwuwu";
				else dg5x=wqx5x[n];
				if(kkksc!=dg5x)mdz=0;
			}
			int eee=0;
			if(ans.size()){
				for(int i=0;i<ans.size();i++){
					qkjl.push_back(ans[i]);
					for(string s:cz4x)
						if(ans[i].second==s)
							eee+=2;
					for(string s:xd4x)
						if(ans[i].second==s)
							eee+=2;
					for(string s:wcz5x)
						if(ans[i].second==s)
							eee+=10;
					for(string s:wxd5x)
						if(ans[i].second==s)
							eee+=10;
					if(qkjj[ans[i].second]){
						for(string s:_4x)
							if(ans[i].second==s)
								if(qkjj[ans[i].second]>7)eee+=5;
								else eee+=2;
					}
					qkjj[ans[i].second]++;
				}
			}
			cls;
			print(ans);
			if(ans.size()&&eee){
				et;et;
				cp("额外获得"+to_string(eee)+"个无主的星辉",6);et;
				wzdxh+=eee;
			}
			pause;
		}
	}
	void chooseCZ(){
		while(1){
			cls;
			cp("抽卡     ",3);
			cp("原石:"+to_string(ys),6);
			cp("     无主的星辉:"+to_string(wzdxh),5);
			cp("     纠缠之缘:"+to_string(jczy),6);et;
			cp("1.单抽 2.10连抽 3.选择目标 4.兑换 5.抽卡记录 0.退出");et;
			string s;cin>>s;
			vector<pair<int,string> >ans;
			if(s=="1"){
				if(jczy<1){
					if(ys<160){
						cp("原石不足",4);
						Sleep(2000);
						continue;
					}
					ys-=160,jczy++;
				}
				jczy--;
				ans=get_CZ(1);
			}if(s=="2"){
				if(jczy<10){
					if(ys<(10-jczy)*160){
						cp("原石不足",4);
						Sleep(2000);
						continue;
					}
					ys-=(10-jczy)*160,jczy=10;
				}
				jczy-=10;
				ans=get_CZ(10);
			}if(s=="5"){
				cls;
				cp("共抽"+to_string(choose_count)+"次",3);et;et;et;
				for(int i=0;i<qkjl.size();i++){
					cp(qkjl[i].second,ttttt[qkjl[i].first]);et;
				}et;et;
				cp("共获得",3);et;
				vector<pair<string,int> >kkks;
				for(pair<string,int>kkk:qkjj)
					kkks.push_back({kkk.first,kkksb03[kkk.first]});
				sort(kkks.begin(),kkks.end(),cmp);
				for(pair<string,int>kkk:kkks){
					cp(kkk.first+"*"+to_string(qkjj[kkk.first]),ttttt[kkk.second]);et;
				}
				pause;
			}if(s=="0")return;
			if(s=="4"){
				cls;
				cp("兑换     ",3);
				cp("原石:"+to_string(ys),6);
				cp("     无主的星辉:"+to_string(wzdxh),5);et;
				cp("1.星辉兑换 2.原石兑换 0.退出");et;
				cin>>s;
				if(s=="0")continue; 
				if(s=="1"){
					cls;
					cp("纠缠之缘(5*无主的星辉)(最多兑换"+to_string(wzdxh/5)+"个)",6);et;
					int n;cin>>n;
					n=min(max(n,0),wzdxh/5);
					wzdxh-=n*5;
					jczy+=n;
				}if(s=="2"){
					cls;
					cp("纠缠之缘(160*原石)(最多兑换"+to_string(ys/160)+"个)",6);et;
					int n;cin>>n;
					n=min(max(n,0),ys/160);
					ys-=n*160;
					jczy+=n;
				}
			}
			int eee=0;
			if(ans.size()){
				for(int i=0;i<ans.size();i++){
					qkjl.push_back(ans[i]);
					for(string s:cz4x)
						if(ans[i].second==s)
							eee+=2;
					for(string s:wcz5x)
						if(ans[i].second==s)
							eee+=10;
					if(qkjj[ans[i].second]){
						for(string s:_4x)
							if(ans[i].second==s)
								if(qkjj[ans[i].second]>7)eee+=5;
								else eee+=2;
						for(string s:cz5x)
							if(ans[i].second==s)
								if(qkjj[ans[i].second]>7)eee+=25;
								else eee+=10;
					}
					qkjj[ans[i].second]++;
				}
			}
			cls;
			print(ans);
			if(ans.size()&&eee){
				et;et;
				cp("额外获得"+to_string(eee)+"个无主的星辉",6);et;
				wzdxh+=eee;
			}
			pause;
		}
	}
}
namespace StarRail{
	
}
int main(){
	SetConsoleTitle("抽卡模拟器   by BC20260086");
	kkksc03:{}
	dg5x="wuwuwu";
	GenshinImpact::init();
	for(int i=1;i<=15;i++)
		cp("--",i,0,1);
	et;et;
	cp("1.原神 0.退出");et;
	string s;cin>>s;
	if(s=="0")return 0;
	if(s=="1"){
		gs:{}
		cls;cp("选择池子",3);et;et;
		cp("1.角色池 2.武器池 3.常驻池 0.退出");et;
		cin>>s;
		_3x=GenshinImpact::_3x,_4x=GenshinImpact::_4x,cz5x=GenshinImpact::cz5x,xd5x=GenshinImpact::xd5x;
		cz4x=GenshinImpact::cz4x,xd4x=GenshinImpact::xd4x,wcz5x=GenshinImpact::wcz5x,wxd5x=GenshinImpact::wxd5x;
		if(s=="0")goto kkksc03;
		if(s=="1"){
			jsc:{}
			cls;cp("角色池",3);et;et;
			cp("1.进入 2.选择卡池内容 0.退出");et;
			cin>>s;
			if(s=="0")goto gs; 
			if(s=="2"){
				cls;cp("选择卡池内容",3);et;et;
				cp("1.选择4星 2.选择5星 0.退出");et;
				cin>>s;
				if(s=="0")goto jsc;
				if(s=="1"){
					cls;cp("选择4星",3);et;et;
					cp("选择3个");et;
					for(int i=0;i<GenshinImpact::_4x.size();i++){
						cout<<i+1<<'.'<<GenshinImpact::_4x[i];et;
					}et;
					for(int i=0;i<3;i++){
						int t;cin>>t;
						x4x[i]=GenshinImpact::_4x[t-1];
					}
					goto jsc;
				}if(s=="2"){
					cls;cp("选择5星",3);et;et;
					cp("选择1个");et;
					for(int i=0;i<GenshinImpact::xd5x.size();i++){
						cout<<i+1<<'.'<<GenshinImpact::xd5x[i];et;
					}et;
					int t;cin>>t;
					x5x=GenshinImpact::xd5x[t-1];
					goto jsc;
				}
			}
			if(s=="1")GenshinImpact::chooseJS();
		}if(s=="2"){
			j2:{}
			cls;cp("武器池",3);et;et;
			cp("1.进入 2.选择卡池内容 0.退出");et;
			cin>>s;
			if(s=="0")goto gs; 
			if(s=="2"){
				cls;cp("选择卡池内容",3);et;et;
				cp("1.选择4星 2.选择5星 0.退出");et;
				cin>>s;
				if(s=="0")goto j2;
				if(s=="1"){
					cls;cp("选择4星",3);et;et;
					cp("选择5个");et;
					for(int i=0;i<GenshinImpact::cz4x.size();i++){
						cout<<i+1<<'.'<<GenshinImpact::cz4x[i];et;
					}et;
					for(int i=GenshinImpact::cz4x.size();i-GenshinImpact::cz4x.size()<GenshinImpact::xd4x.size();i++){
						cout<<i+1<<'.'<<GenshinImpact::xd4x[i-GenshinImpact::cz4x.size()];et;
					}et;
					for(int i=0;i<5;i++){
						int t;cin>>t;
						if(t>=GenshinImpact::cz4x.size()){
							t-=GenshinImpact::cz4x.size();
							wqx4x[i]=GenshinImpact::xd4x[t];
						}else  wqx4x[i]=GenshinImpact::cz4x[t-1];
					}
					goto j2;
				}if(s=="2"){
					cls;cp("选择5星",3);et;et;
					cp("选择2个");et;
					for(int i=0;i<GenshinImpact::wxd5x.size();i++){//常驻五星不做 
						cout<<i+1<<'.'<<GenshinImpact::wxd5x[i];et;
					}et;
					int t;
					for(int i=0;i<2;i++){
						int t;cin>>t;
						wqx5x[i]=GenshinImpact::wxd5x[t-1];
					}
					goto j2;
				}
			}
			if(s=="1")GenshinImpact::chooseWQ();
		}if(s=="3")GenshinImpact::chooseCZ();
	}cls;
	main();
}