QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#298840 | #6309. Aqre | c201904# | WA | 0ms | 3628kb | C++14 | 542b | 2024-01-06 15:07:32 | 2024-01-06 15:07:34 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=1e3+5;
int n,m;
int cases;
char a[N][N];
int vis[4][4];
int main(){
int cases;
scanf("%d",&cases);
while(cases--){
int ans=0;
scanf("%d%d",&n,&m);
vis[1][1]=vis[0][3]=vis[3][0]=vis[2][2]=1;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
if(vis[i%4][j%4])a[i][j]='0';
else a[i][j]='1',ans++;
}
}
printf("%d\n",ans);
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
printf("%c",a[i][j]);
}
puts("");
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3628kb
input:
3 2 2 3 4 3 8
output:
3 11 10 9 1110 1011 1101 18 11101110 10111011 11011101
result:
wrong answer ans finds a larger answer (test case 1)