# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
94164 | bkinik | Prosjecni (COCI16_prosjecni) | C++14 | 2 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |