| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 144429 | Kevin | 拐角方阵 | C++ | Accepted | 1 MS | 272 KB | 387 | 2026-01-22 14:52:33 |
#include<bits/stdc++.h> using namespace std; int a[50][50]; int main() { int n,s=1; cin>>n; for(int i=1;i<=n;i++){ for(int j=i;j<=n;j++){ if(i==s||j>i) a[i][j]=s; } for(int z=i;z<=n;z++){ if(i==s||z>i){ a[z][i]=s; } } s++; } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }