제출 #242538

#제출 시각아이디문제언어결과실행 시간메모리
242538VEGAnnProsjecni (COCI16_prosjecni)C++14
24 / 120
5 ms384 KiB
#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
using namespace std;
const int N = 510;
int n, m, k, id[N], x;
string s[N], t;

int main(){
    ios_base::sync_with_stdio(0); cin.tie(0);

#ifdef _LOCAL
    freopen("in.txt","r",stdin);
#endif // _LOCAL

    cin >> n;

    if (n & 1){
        for (int i = 1; i <= n * n; i++){
            cout << i;

            if (i % n == 0)
                cout << '\n';
            else cout << " ";
        }
    } else cout << -1;

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...