#include<bits/stdc++.h>
using namespace std;
int leng[14]={1,1,1,1,2,2,2,5,5,5,8,15,15,100};
int shot[21]={1,1,2,2,2,3,3,3,3,4,5,5,5,7,8,8,8,10,10,15,100};
int main(){
cout<<"抽签模拟器"<<endl;
system("pause");system("cls");
cout<<"________■__■■■■______■■■■■■■_________■■■■________________■______________"<<endl;
cout<<"___■___■_______ ■_____■_■■■■■_■______■■_____■■_______■■■■■■■___________"<<endl;
cout<<"___■___■________■_________■■■__■_____■■_■■■■__■■________■______________"<<endl;
cout<<"___■___■________■_______■■■_■■■____________■_________________■■■■________________________"<<endl;
cout<<"___■___■__■■■■_____■■■ ■_____________■■■■■■_____________■____________________"<<endl;
cout<<"___■___■________■_______■■■■■_______________■____________■■■■■■■■_______"<<endl;
cout<<"___■__■_________■______■■___■__■________■___■___■___________■■__■■________________"<<endl;
cout<<"______■__________■_____________■___________■____■____■____________■■■_______"<<endl;
cout<<"_____■_____■■■■___________■■_______________■■______________ ■■____■■_______"<<endl;
cout<<" 归 冢 余 妄 "<<endl;
cout<<" 工作室 "<<endl;
if(1){int i=1;while(i<=5){system("color C6");system("color E4");system("color C6");system("color E4");i++;}}system("color 07");system("pause");
system("cls");
cout<<"请依次输入只抽长签的人、只抽短签的人和既抽长签又抽长短签的人数:";
int a,b,c;
cin>>a>>b>>c;
srand(time(NULL));
int sum1=0,sum2=0,sum3=0;
cout<<"只抽长签的人抽中的积分:"<<endl;
for(int i=1;i<=a;i++){
int s=rand()%14,s2=rand()%14;
while(s!=s2)s=rand()%14;s2=rand()%14;
sum1+=leng[s]+leng[s2];
cout<<i<<"."<<leng[s]<<" "<<leng[s2]<<endl;
}
cout<<endl<<endl<<"只抽短签的人抽中的积分:"<<endl;
for(int i=1;i<=b;i++){
int s=rand()%21,s2=rand()%21;
while(s!=s2)s=rand()%21;s2=rand()%21;
sum2+=shot[s]+shot[s2];
cout<<i<<"."<<shot[s]<<" "<<shot[s2]<<endl;
}
cout<<endl<<endl<<"既抽长签又抽长短签的人抽中的积分:"<<endl;
for(int i=1;i<=c;i++){
int s=rand()%14,s2=rand()%21;
sum3+=leng[s]+shot[s2];
cout<<i<<"."<<leng[s]<<" "<<shot[s2]<<endl;
}
cout<<endl<<endl<<"平均依次为:"<<sum1*1.0/a<<" "<<sum2*1.0/b<<" "<<sum3*1.0/c;
return 0;
}