#include #include #include #include #include using namespace std; bool izp[200*200]; struct kletka { int x, y, v; }; bool sr( kletka a, kletka b) { return a.v>b.v; } long long otg; kletka kl[400]; int pole[200][200]; int n,r,k; int posokaX[8]={0 ,1 , 1, 1, 0 ,-1, -1, -1} ; int posokaY[8]={-1, -1, 0, 1, 1 , 1, 0 , -1}; int used[200][200]; int tochki(int x, int y) { map m; set sreshtani; int res=0; for(int i=1;i<=r;i++) { for(int h=0;h<8;h++) { if(x+posokaX[h]*i=0 && y+posokaY[h]*i=0) { res+=pole[x+posokaX[h]*i][y+posokaY[h]*i]; sreshtani.insert(pole[x+posokaX[h]*i][y+posokaY[h]*i]); m[pole[x+posokaX[h]*i][y+posokaY[h]*i]]++; // cout<:: iterator it=sreshtani.begin() ;it!=sreshtani.end();it++) { if(m[*it]>maxx)///oprej go { maxx=m[*it]; chislo=*it; } } // cout<=0 && y+posokaY[h]*i=0) { used[x+posokaX[h]*i][y+posokaY[h]*i]++; // cout<=0 && y+posokaY[h]*i=0) { if( used[x+posokaX[h]*i][y+posokaY[h]*i]) { if(used[x+posokaX[h]*i][y+posokaY[h]*i]>otg) otg=used[x+posokaX[h]*i][y+posokaY[h]*i]; } // cout<>n>>r>>k; for(int y=0;y>pole[x][y]; } } int next=0; for(int Y=0;Y