QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#166754#6743. water235PhantomThreshold#WA 2ms3804kbC++20363b2023-09-06 17:41:022023-09-06 17:41:02

Judging History

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

  • [2023-09-06 17:41:02]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3804kb
  • [2023-09-06 17:41:02]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,m;
	cin>>n>>m;
	cout<<max(n,m)<<endl;
	vector<vector<int>> a(n+5,vector<int>(m+5));
	for(int i=1;i<=max(n,m);i++)a[min(i,n)][min(i,m)]=1;
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++)
		{
			cout<<a[i][j]<<" \n"[j==m];
		}
	}
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3528kb

input:

2 1

output:

2
1
1

result:

ok The answer is correct.

Test #2:

score: 0
Accepted
time: 2ms
memory: 3592kb

input:

3 3

output:

3
1 0 0
0 1 0
0 0 1

result:

ok The answer is correct.

Test #3:

score: -100
Wrong Answer
time: 1ms
memory: 3804kb

input:

1 4

output:

4
1 1 1 1

result:

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