Run ID:149433
提交时间:2026-03-13 10:44:49
#include<bits/stdc++.h> using namespace std; int a[25][25]; 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(j-i==y-x){ cout<<'('<<i<<','<<j<<')'<<" "; } } } cout<<endl; for(int i=n;i>=1;i--){ for(int j=1;j<=n;j++){ if(i+j==x+y){ cout<<'('<<i<<','<<j<<')'<<" "; } } } return 0; }