| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 368974 | 黄浙峰老师 | 【C3-T】格子位置 | C++ | 通过 | 100 | 183 MS | 248 KB | 536 | 2025-12-19 18:35:19 |
#include<iostream> using namespace std; int main(){ int n,x,y; cin>>n>>x>>y; for(int i=1;i<=n;i++){ cout<<"("<<x<<","<<i<<")"; } cout<<endl; for(int i=1;i<=n;i++){ cout<<"("<<i<<","<<y<<")"; } cout<<endl; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(x-y==i-j){ cout<<"("<<i<<","<<j<<")"; } } } cout<<endl; for(int i=n;i>=1;i--){ for(int j=1;j<=n;j++){ if(x+y==i+j){ cout<<"("<<i<<","<<j<<")"; } } } return 0; }