QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#276678#6743. water235ucup-team958#WA 3ms27304kbC++14531b2023-12-06 07:47:112023-12-06 07:47:11

Judging History

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

  • [2023-12-06 07:47:11]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:27304kb
  • [2023-12-06 07:47:11]
  • 提交

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