QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#239075#6418. Ah, It's Yesterday Once MorePlentyOfPenaltyWA 0ms3548kbC++20592b2023-11-04 18:21:552023-11-04 18:21:56

Judging History

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

  • [2023-11-04 18:21:56]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3548kb
  • [2023-11-04 18:21:55]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=25;
int n,a[N][N];
void solve(int l,int r,bool fl){
	if(l>r){
		return;
	}
	for(int i=l;i<=r;i++){
		a[l][i]=1;
		a[r][i]=1;
		a[i][l]=1;
		a[i][r]=1;
	}
	if(fl){
		a[l+2][l+1]=1;
		a[r][r-1]=0;
	}else{
		a[r-2][r-1]=1;
		a[l+1][l]=0;
	}
	solve(l+2,r-2,!fl);
}
int main(){
	cin.tie(0)->sync_with_stdio(0);
	n=20;
	solve(1,n,true);
	cout<<n<<" "<<n<<endl;
	a[11][10]=0;
	for(int i=1;i<=n;i++){
		//for(int j=1;j<=n;j++)cout<<a[i][j];
		for(int j=1;j<=n;j++)cout<<(a[i][j]?'X':' ');
		cout<<endl;
	}
}

详细

Test #1:

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

input:



output:

20 20
XXXXXXXXXXXXXXXXXXXX
X                  X
XXXXXXXXXXXXXXXXXX X
X                X X
X X XXXXXXXXXXXX X X
X X X          X X X
X X XXXXXXXXXX X X X
X X X        X X X X
X X X X XXXX X X X X
X X X X X  X X X X X
X X X X X  X X X X X
X X X X XX XXX X X X
X X X X      X X X X
X X X XXXXXXXX X X X
...

result:

wrong answer must contain only 0 and 1