QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#276678 | #6743. water235 | ucup-team958# | WA | 3ms | 27304kb | C++14 | 531b | 2023-12-06 07:47:11 | 2023-12-06 07:47:11 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int maxn=1000010;
int n,m;
vector<int>v[maxn];
void Print(int tot=0){
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
tot+=v[i][j];
printf("%d\n",tot);
for(int i=1;i<=n;i++,printf("\n"))
for(int j=1;j<=m;j++)
printf("%d ",v[i][j]);
}
int main(){
scanf("%d%d",&n,&m);
for(int i=1;i<=n;i++)
for(int j=0;j<=m;j++)
v[i].push_back(0);
for(int i=1;i<=m;i+=2) v[1][i]=1;
for(int i=3;i<=n;i+=2) v[i][1]=1;
v[1][n]=v[n][1]=1,Print();
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 3ms
memory: 27300kb
input:
2 1
output:
2 1 1
result:
ok The answer is correct.
Test #2:
score: 0
Accepted
time: 0ms
memory: 27304kb
input:
3 3
output:
3 1 0 1 0 0 0 1 0 0
result:
ok The answer is correct.
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 27304kb
input:
1 4
output:
2 1 0 1 0
result:
wrong answer The answer is wrong: expected = 3, found = 2