QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#672243 | #9415. Matrix | confirm14478# | WA | 0ms | 3580kb | C++20 | 988b | 2024-10-24 16:08:44 | 2024-10-24 16:08:46 |
Judging History
answer
#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define YES cout<<"YES\n"
#define NO cout<<"NO\n"
#define endl "\n"
#define debug cout<<'*'<<'\n'
#define int long long
const int N =205, M = 5e5+50;
const int mod = 1e9 + 7, inf = 2e18;
using namespace std;
using namespace __gnu_pbds;
using pii=pair<int,int>;
int a[N][N];
void solve(){
int n;
cin>>n;
int t=0;
a[1][1]=++t;
a[1][2]=++t;
a[2][1]=++t;
a[2][2]=++t;
for(int i=3;i<=n;i++)a[i][i]=++t;
++t;
for(int i=3;i<=n;i++)a[i][1]=a[i][2]=a[1][i]=a[2][i]=t;
for(int i=3;i<=n;i++) {
++t;
for(int j=i+1;j<=n;j++) {
a[i][j]=t;
a[j][i]=t;
}
}
YES;
for(int i=1;i<=n;i++) {
for(int j=1;j<=n;j++)cout<<a[i][j]<<" ";
cout<<endl;
}
}
signed main()
{
//freopen("C:\\Users\\win11\\Desktop\\test.txt", "r", stdin);
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
long long T = 1;
//cin >> T;
while (T--)solve();
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3580kb
input:
2
output:
YES 1 2 3 4
result:
wrong answer Line [name=yesno] equals to "YES", doesn't correspond to pattern "Yes|No" (test case 1)