Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
72549 sh25_ganzy 同行列对角线的格 C++ 编译错误 0 MS 0 KB 631 2025-11-01 23:01:45

Tests(0/0):


#include<bits/stdc++.h> using namespace std; int main(){ int n,i,j; cin>>n>>i>>j; for(int k=1;k<=n;k++){ cout<<'('<<i<<','<<k<<')'; } cout<<endl; for(int k=1;k<=n;k++){ cout<<'('<<k<<','<<j<<')'; } cout<<endl; for(int p=1;p<=n;p++){ for(int q=1;q<=n;q++){ if(p-q==i-j){ cout<<'('<<p<<','<<q<<") "; } } } cout<<endl; for(int p=n;p>=1;p--){ for(int q=n;q>=1;q--){ if(p+Q==i+j){ cout<<'('<<p<<','<<q<<") "; } } } return 0; }


测评信息: