Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
335395 小林老师 【C3-T】格子位置 C++ 通过 100 314 MS 248 KB 490 2025-07-22 21:02:42

Tests(10/10):


#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; }


测评信息: