#include #include #include #include using namespace std; const int maxn=150; int n,pos; double sum,pri[maxn]; struct player { char name[25]; double prize; bool amateur,t; int sc[4],pre,tot,dq,rk; } p[maxn]; bool cmp1(const player &a,const player &b) { if(a.dq>-3&&b.dq>-3) return a.preb.dq; } bool cmp2(const player &a,const player &b) { if(a.dq!=b.dq) return a.dq>b.dq; if(a.tot!=b.tot) return a.tot-3) ++pos; while(p[pos].dq>-3&&p[pos].pre==p[pos-1].pre) ++pos; sort(p,p+pos,cmp2); int k=0,rk=0,prk=0; while(k69) p[i].amateur=true,p[i].t=false; if(!p[i].amateur) p[i].prize=sum,p[i].t=cnt>1; } k=sta-1,k++; prk+=cnt; } } void print() { printf("Player Name Place RD1 RD2 RD3 RD4 TOTAL Money Won\n"); printf("-----------------------------------------------------------------------\n"); for(int i=0;i0) { init(); solve(); print(); if(t) printf("\n"); } return 0; }