/**
* author: wxhtzdy
* created: 11.08.2022 21:13:23
**/
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
if (n % 2 == 1) {
int a = 1;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cout << a << " \n"[j == n - 1];
a += 1;
}
}
} else {
cout << -1 << '\n';
}
return 0;
}
# |
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 |
1 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
4 |
Correct |
1 ms |
316 KB |
Output is correct |
5 |
Incorrect |
1 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
6 |
Incorrect |
1 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
7 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |
8 |
Incorrect |
1 ms |
320 KB |
Integer -1 violates the range [0, 1000000000] |
9 |
Incorrect |
1 ms |
320 KB |
Integer -1 violates the range [0, 1000000000] |
10 |
Incorrect |
0 ms |
212 KB |
Integer -1 violates the range [0, 1000000000] |