| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150223 | 黄芃硕 | 同行列对角线的格 | C++ | Accepted | 1 MS | 268 KB | 611 | 2026-03-23 18:08:25 |
#include<cmath> #include<iostream> #include<cstring> using namespace std; int a[100][100],s[600][600]; int main() { int n,i,j; cin>>n>>i>>j; for(int x=1;x<=n;x++) { cout<<'('<<i<<','<<x<<')'<<" "; } cout<<endl; for(int x=1;x<=n;x++) { cout<<'('<<x<<','<<j<<')'<<" "; } cout<<endl; for(int x=1;x<=n;x++) { for(int y=1;y<=n;y++) { if(y-x==j-i) { cout<<'('<<x<<','<<y<<')'<<" "; } } } cout<<endl; for(int x=1;x<=n;x++) { for(int y=1;y<=n;y++) { if(y+x==j+i) { cout<<'('<<y<<','<<x<<')'<<" "; } } } return 0 ; }