#include char pole[301][151]; //pole [c][r] int C,R,M; void printpole() { return; int c,r; for(r=R;r>=1;r--) { for(c=1;c<=C;c++) cout<1) && (pole[i-1][j] == x)) v +=oznac(i-1,j,x); if((i1) && (pole[i][j-1] == x)) v += oznac(i,j-1,x); if((j>C>>R; for(r=R;r>=1;r--) for(c=1;c<=C;c++) { cin>>pole[c][r]; } // printpole(); //ted ctu zadani cin>>M; while(M) { char x; int v; cin>>i>>j; x = pole[i][j]; if( (x != '.') &&( (pole[i+1][j] == x) || (pole[i][j+1] == x) || (pole[i-1][j] == x) || (pole[i][j-1] == x))) { v= oznac(i,j,x); v -= 2; body = body + (v*v); } // printpole(); ///ted setrepat tc=1; char tmp; for(c=1; c<=C; c++) { t=1; //tr for(r=1;r<=R;r++) { if((tmp=pole[c][r]) != '.') { pole[tc][t] = tmp; if( (t != r) || (tc != c) ) pole[c][r] = '.'; t++; } } if(pole[c][1] != '.') tc++; } while(pole[C][1] == '.') C--; // printpole(); M--; } //while if(pole[1][1] == '.') body += 1000; cout<<"Game over!"<<'\n'; cout<<"Score dosazene v teto hre je "<>N; while(N) { pracuj(); N--; } return(0); }