#include #include #include using namespace std; struct da { int gol,gas,pct; }; da a[100]; int i,j,team,jj,scor1,scor2,poz1,poz2; char s[1005],ss[100][1005],cuv1[1005],cuv2[1005]; int cautare(char s[]) { int i; bool ok=true; for (i=1; i<=team; i++) { ok=true; if (strlen(ss[i])==strlen(s)) { for (j=0; jstrlen(ss[y.gas])&&x.gas='A'&&ss[x.gas][j]<='Z')ss[x.gas][j]=char(32+int(ss[x.gas][i])),ok1=true; if (ss[y.gas][j]>='A'&&ss[y.gas][j]<='Z')ss[y.gas][j]=char(32+int(ss[y.gas][i])),ok2=true; if (int(ss[x.gas][i])>int(ss[y.gas][i])&&x.gasscor2) { a[poz1].pct+=3; a[poz1].gol+=scor1; a[poz2].gol+=scor2; a[poz2].gas=team; } else if (scor2>scor1) { a[poz2].pct+=3; a[poz2].gol+=scor2; a[poz1].gol+=scor1; } else { a[poz2].pct++; a[poz1].pct++; a[poz1].gol+=scor1; a[poz2].gol+=scor2; } memset(cuv1,NULL,sizeof(cuv1)); memset(cuv2,NULL,sizeof(cuv2)); } sort(a+1,a+team+1,cmp); for (i=1; i<=4; i++) { for (j=0; j