#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ int n; cin >> n; // your code goes here int out[n-1][n-1],reach[n][n]; int x,y,dead,cap,step,xo,yo; for(int i=1;i=0&&reach[ii+i][jj-j]==-1) { reach[ii+i][jj-j]=step+1; cap++; // reach[jj-j][ii+i]=step+1; } if(ii+j=0&&reach[ii+j][jj-i]==-1) { reach[ii+j][jj-i]=step+1; cap++; // reach[jj-i][ii+j]=step+1; } if(ii-i>=0&&jj+j=0&&jj+i=0&&jj-j>=0&&reach[ii-i][jj-j]==-1) { reach[ii-i][jj-j]=step+1; cap++; // reach[jj-j][ii-i]=step+1; } if(ii-j>=0&&jj-i>=0&&reach[ii-j][jj-i]==-1) { reach[ii-j][jj-i]=step+1; cap++; // reach[jj-i][ii-j]=step+1; } //cout<