#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcount
#define ll long long
#define mp make_pair
#define f first
#define s second
#define Time (double)clock()/CLOCKS_PER_SEC
signed main() {
#ifdef HOME
freopen("input.txt", "r", stdin);
#else
#define endl '\n'
ios_base::sync_with_stdio(0); cin.tie(0);
#endif
int n;
cin >> n;
if (n == 2) {
cout << "-1" << endl;
exit(0);
}
int x = 0;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < n; ++j) {
cout << x << ' ';
++x;
}
cout << endl;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
384 KB |
Average condition doesn't hold. |
2 |
Correct |
4 ms |
384 KB |
Output is correct |
3 |
Incorrect |
4 ms |
384 KB |
Average condition doesn't hold. |
4 |
Correct |
5 ms |
384 KB |
Output is correct |
5 |
Incorrect |
5 ms |
384 KB |
Average condition doesn't hold. |
6 |
Incorrect |
5 ms |
384 KB |
Average condition doesn't hold. |
7 |
Incorrect |
5 ms |
384 KB |
Average condition doesn't hold. |
8 |
Incorrect |
5 ms |
384 KB |
Average condition doesn't hold. |
9 |
Incorrect |
5 ms |
384 KB |
Average condition doesn't hold. |
10 |
Incorrect |
6 ms |
384 KB |
Average condition doesn't hold. |