Submission #1299952

#TimeUsernameProblemLanguageResultExecution timeMemory
1299952tabProsjecni (COCI16_prosjecni)C++20
24 / 120
1 ms348 KiB
#include "bits/stdc++.h"
using namespace std;
#define intt long long
#define fi first
#define se second

const intt mxN = 2e5 + 5;
const intt LG = 20;
const intt inf = 1e18;  

intt n;

void _() { 
    cin >> n;
    if(n % 2 != 0) {
        for(intt i = 1; i <= n; i++) {
            for(intt j = 1; j <= n; j++) {
                cout << (i - 1) * n + j << " ";
            }
            cout << endl;
        }
    } else {
        cout << -1 << endl;
    }
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    
    intt t = 1, buu = 1;
    // cin >> t;
    while(t--){
        // cout << "Case #" << buu++ << ": ";
        _();
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...