1234567
int m[6][6]; for (int j = 0; j < 6; j++) for (int i = 0; i < 6; i++) if (i + j > 5) m[j][i] = -1; else if (i + j < 5) m[j][i] = 1; else m[j][i] = 0;
12345
for (int j = 0; j < s; j++) for (int i = 0; i < s; i++) if (i + j > s-1) m[j][i] = -1; else if (i + j < s-1) m[j][i] = 1; else m[j][i] = 0;