QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#292159 | #6309. Aqre | fstqwq# | WA | 0ms | 3796kb | C++14 | 1007b | 2023-12-27 19:53:33 | 2023-12-27 19:53:34 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5;
char st[N];
int main(){
int T;scanf("%d",&T);
while(T--){
int n,m;scanf("%d%d",&n,&m);
st[m+1]='\0';
if(n<=3){
for(int i=1;i<=m;i++){
if(i%4==0)st[i]='0';
else st[i]='1';
}
for(int i=1;i<=n;i++)printf("%s\n",st+1);
}
else if(m<=3){
for(int i=1;i<=n;i++){
if(i%4==0){
for(int j=1;j<=m;j++)st[j]='0';
}
else{
for(int j=1;j<=m;j++)st[j]='1';
}
printf("%s\n",st+1);
}
}
else{
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if((i-1+j)%4==0)st[j]='0';
else st[j]='1';
}
printf("%s\n",st+1);
}
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3796kb
input:
3 2 2 3 4 3 8
output:
11 11 1110 1110 1110 11101110 11101110 11101110
result:
wrong answer Integer parameter [name=ans] equals to 11, violates the range [0, 4] (test case 1)