QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#276677#6743. water235ucup-team958#WA 6ms27348kbC++14523b2023-12-06 07:44:092023-12-06 07:44:10

Judging History

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

  • [2023-12-06 07:44:10]
  • 评测
  • 测评结果:WA
  • 用时:6ms
  • 内存:27348kb
  • [2023-12-06 07:44:09]
  • 提交

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[n][1]=1,Print();
	return 0;
} 

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 6ms
memory: 27348kb

input:

2 1

output:

2
1 
1 

result:

ok The answer is correct.

Test #2:

score: 0
Accepted
time: 3ms
memory: 27296kb

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: 27232kb

input:

1 4

output:

2
1 0 1 0 

result:

wrong answer The answer is wrong: expected = 3, found = 2