Skip to content

Instantly share code, notes, and snippets.

@enzerr
Created January 31, 2023 00:23
Show Gist options
  • Save enzerr/aae128287cac0295ea7b5339faa9a7ef to your computer and use it in GitHub Desktop.
Save enzerr/aae128287cac0295ea7b5339faa9a7ef to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e2 + 5;
int mtx[maxn][maxn];
int main(){
int n; cin >> n;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
cout << min({i, j, n-i+1, n-j+1});
}
cout << '\n';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment