QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#218667 | #6743. water235 | Berlin_Jacor | WA | 0ms | 3608kb | C++14 | 412b | 2023-10-18 16:40:07 | 2023-10-18 16:40:07 |
Judging History
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