#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
ll n,a=1,i,j;
cin>>n;
if(n%2==0){
cout<<"-1"<<endl;
}
else{
for(i=0;i<n;i++){
for(j=0;j<n;j++){
cout<<a<<" ";
a++;
}
cout<<endl;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Incorrect |
0 ms |
304 KB |
Integer -1 violates the range [0, 1000000000] |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Incorrect |
1 ms |
300 KB |
Integer -1 violates the range [0, 1000000000] |
6 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
7 |
Incorrect |
1 ms |
296 KB |
Integer -1 violates the range [0, 1000000000] |
8 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
9 |
Incorrect |
1 ms |
304 KB |
Integer -1 violates the range [0, 1000000000] |
10 |
Incorrect |
1 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |