-
个人简介
#include<bits/stdc++.h> using namespace std; long long a[19][19],n; int main() { cin>>n; for(int i=1;i<=(n+1)/2;i++) { for(int j=i;j<=(n-i+1);j++) a[i][j]=i; for(int j=i;j<=(n-i+1);j++) a[j][i]=i; for(int j=i;j<=n-i+1;j++) a[n-i+1][j]=i; for(int j=i;j<=n-i+1;j++) a[j][n-i+1]=i; } for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) cout<<a[i][j]<<" "; cout<<endl; } return 0; } -
通过的题目
-
最近活动
This person is lazy and didn't join any contests or homework. -
最近编写的题解
This person is lazy and didn't write any solutions.
题目标签
- 2021
- 1
- CSP-J
- 1