QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#239075 | #6418. Ah, It's Yesterday Once More | PlentyOfPenalty | WA | 0ms | 3548kb | C++20 | 592b | 2023-11-04 18:21:55 | 2023-11-04 18:21:56 |
Judging History
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