Submission #1340795

#TimeUsernameProblemLanguageResultExecution timeMemory
1340795kawhietProsjecni (COCI16_prosjecni)C++20
24 / 120
0 ms344 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    if (n % 2 == 0) {
        cout << -1 << '\n';
    } else {
        int x = 1;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                cout << x++ << ' ';
            }
            cout << '\n';
        }
    }
    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...