Submission #94164

#TimeUsernameProblemLanguageResultExecution timeMemory
94164bkinikProsjecni (COCI16_prosjecni)C++14
24 / 120
2 ms376 KiB
#include<bits/stdc++.h> using namespace std; #define pob pop_back #define mp make_pair #define pb push_back #define mid (l+r)/2 #define test printf("test\n") #define st first #define nd second #define superman ios::sync_with_stdio(0);cin.tie(0); typedef long long ll; typedef pair<ll,ll> pll; ll INF = 1e9; ll mod = 1e9+7; double pi = acos(-1); ll l,k,m,n,ans,r; int main() { superman //freopen(".gir","r",stdin); //freopen(".cik","w",stdout); cin>>n; if(n%2 == 0) { cout<<-1<<endl; return 0; } ll cnt = 1; for(int i=0; i<n; i++) { for(int j=0; j<n-1; j++) { cout<<cnt++<<' '; } cout<<cnt++<<endl; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...