QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#218667#6743. water235Berlin_JacorWA 0ms3608kbC++14412b2023-10-18 16:40:072023-10-18 16:40:07

Judging History

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

  • [2023-10-18 16:40:07]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3608kb
  • [2023-10-18 16:40:07]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 998244353;
signed main() {
	int n,m;
	cin>>n>>m;
	cout<<max(n,m)<<"\n";
	for(int i=1;i<=n;++i) {
		for(int j=1;j<=m;++j) {
			if(i==j) {
				cout<<"1 ";
			}
			else if(j<=min(n,m)&&i<=min(n,m)) {
				cout<<"0 ";
			}
			else if(i==1||j==1) {
				cout<<"1 ";
			}
			else cout<<"0 ";
		}
		cout<<"\n";
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3604kb

input:

2 1

output:

2
1 
1 

result:

ok The answer is correct.

Test #2:

score: 0
Accepted
time: 0ms
memory: 3560kb

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: 0ms
memory: 3608kb

input:

1 4

output:

4
1 1 1 1 

result:

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