QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#292223 | #6309. Aqre | fstqwq# | WA | 0ms | 3916kb | C++14 | 871b | 2023-12-27 21:11:15 | 2023-12-27 21:11:15 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1e3+5;
char st[N];
int dt[]={0,2,1,3};
int main(){
int T;scanf("%d",&T);
while(T--){
int n,m;scanf("%d%d",&n,&m);
st[m+1]='\0';
if(n<=3 && m<=3){
printf("%d\n",n*m);
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++)st[j]='1';
printf("%s\n",st+1);
}
}
int cnt=0;
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if((dt[i-1]+j)%4==0);
else cnt++;
}
}
printf("%d\n",cnt);
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if((dt[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: 3916kb
input:
3 2 2 3 4 3 8
output:
4 11 11 3 11 10 9 1110 1011 1101 18 11101110 10111011 11011101
result:
wrong answer Length must be equal to m (test case 2)