#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main()
{
ios_base::sync_with_stdio(false); cin.tie(0);
int n; cin>>n;
if(n%2==0) cout<<-1;
else
{
for(int i=0; i<n; i++)
{
for(int l=1; l<=n; l++)
{
cout<<i*n+l<<" ";
}
cout<<"\n";
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 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 |
1 ms |
320 KB |
Output is correct |
5 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
6 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
7 |
Incorrect |
0 ms |
256 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 |
320 KB |
Integer -1 violates the range [0, 1000000000] |
10 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |