QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#672241#9415. Matrixconfirm14478#WA 0ms3616kbC++20981b2024-10-24 16:08:222024-10-24 16:08:23

Judging History

你现在查看的是最新测评结果

  • [2024-10-24 16:08:23]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3616kb
  • [2024-10-24 16:08:22]
  • 提交

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;
		}
	}
	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();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3616kb

input:

2

output:

1 2 
3 4 

result:

wrong answer Line [name=yesno] equals to "1 2 ", doesn't correspond to pattern "Yes|No" (test case 1)