Run ID:150223

提交时间: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 ; }