#include using namespace std; typedef long long ll; typedef pair P; int g4[4][4] = {{1,0,0,1},{0,1,1,0},{0,1,1,0},{1,0,0,1}}; int main(void){ int n,x,y,z; cin >> n >> x >> y >> z; vector> grid(n,vector(n)); x--;y--; int cnt = 1; for(int i=0;i=0;i--){ for(int j=n-1;j>=0;j--){ if(g4[i%4][j%4] == 0)grid[i][j] = cnt; cnt++; } } int r,c; for(int i=0;ic //y->r for(int i=0;i> org = grid; //cout <