提交时间:2023-07-21 06:14:42
运行 ID: 23096
#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<=n;i1++){ for(int j1=1;j1<=n;j1++){ if(i-j==i1-j1) cout<<"("<<i1<<","<<j1<<") "; } } cout<<endl; for(int i1=n;i1>=1;i1--){ for(int j1=n;j1>=1;j1--){ if(i+j==i1+j1) cout<<"("<<i1<<","<<j1<<") "; } } return 0; }