#include #include #include #include #define LENGTH(x) (sizeof(x)/sizeof(*(x))) int N,Ni; char a[300][150]; int hx[150000]; int hy[150000]; int hc; int hi; int n[300]; int rx,ry; int i,j; int b; int pt; int tx,ty,x,y,cp; int still; char ca; int k,curscore; int xxxx[300]; int main(void) { scanf("%d",&N); for (Ni=0;Ni=0; i--) { for (j=0; j0 && a[tx-1][ty]==ca || tx0 && a[tx][ty-1]==ca || ty0 && a[x-1][y]==ca) { a[x-1][y]='.'; still=1; n[x-1]-=1; k++; hx[hc]=x-1; hy[hc]=y; hc++; xxxx[x-1]=1; } if (y>0 && a[x][y-1]==ca) { a[x][y-1]='.'; still=1; n[x]-=1; k++; hx[hc]=x; hy[hc]=y-1; hc++; xxxx[x]=1; } if (x0) { /* for (y=0; y2) curscore+=(k-2)*(k-2); } still=1; for (x=0; x0) still=0; if (still) curscore+=1000; printf("Game over!\nScore dosazene v teto hre je %d bodu.\n",curscore); printf("Byli bychom radi, kdybyste si zahrali jeste jednou.\n"); printf("Prejete si hrat znovu?\nPrijemnou zabavu vam preje firma ACMTENDO.\n"); } return(0); }