Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
18857 | xingru | 同行列对角线的格 | C++ | 解答错误 | 0 MS | 252 KB | 444 | 2023-05-31 18:20:26 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,i,j; cin>>n>>i>>j; for(int j1=1;j1<=n;j1++){ cout<<"("<<i<<","<<j1<<") "; } cout<<endl; for(int i1=1;i1<=n;i1++){ cout<<"("<<i1<<","<<j<<") "; } cout<<endl; for(int i1=1;i1<=j;i1++){ cout<<"("<<i1<<","<<i1+1<<") "; } cout<<endl; int i1=1,j1=n; for(int o=1;o<=n;o++){ cout<<"("<<i1<<","<<j1<<") "; i1=i1+1; j1=j1-1; } return 0; }