#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define _3SgiE60 ios::sync_with_stdio(0),cin.tie(0)
// e
signed main(){
_3SgiE60;
int n;
cin>>n;
if(n%2==0){
printf("-1\n");
return 0;
}
rep(i,n){
rep(j,n){
printf("%d ",i*n+j+1);
}
puts("");
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
4 |
Correct |
0 ms |
320 KB |
Output is correct |
5 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
6 |
Incorrect |
1 ms |
320 KB |
Integer -1 violates the range [0, 1000000000] |
7 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
8 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
9 |
Incorrect |
0 ms |
328 KB |
Integer -1 violates the range [0, 1000000000] |
10 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |