提交时间:2025-07-22 21:02:42
运行 ID: 335395
#include<bits/stdc++.h> using namespace std; int main(){ int n, x, y; cin>>n>>x>>y; for(int j=1; j<=n; j++) cout<<'('<<x<<','<<j<<')'; 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; }