QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#292223#6309. Aqrefstqwq#WA 0ms3916kbC++14871b2023-12-27 21:11:152023-12-27 21:11:15

Judging History

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

  • [2023-12-27 21:11:15]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3916kb
  • [2023-12-27 21:11:15]
  • 提交

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)