QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#204360 | #6743. water235 | kiwiHM# | WA | 3ms | 27088kb | C++20 | 785b | 2023-10-07 10:29:45 | 2023-10-07 10:29:46 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
vector <int> a[1000500];
int n, m;
int main(){
cin >> n >> m;
for (int i = 1; i <= n; i++)
a[i].resize(m + 2);
if (n == m){
for (int i = 1; i <= n; i++)
a[i][i] = 1;
cout << n << endl;
} else if (n < m){
for (int i = 1; i <= n; i++)
a[i][i] = 1;
for (int i = n + 1; i <= m; i++)
a[n][i] = 1;
cout << m << endl;
} else if (n > m){
for (int i = 1; i <= m; i++)
a[i][i] = 1;
for (int i = m + 1; i <= n; i++)
a[i][m] = 1;
}
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
cout << a[i][j] << (j == m ? '\n' : ' ');
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 3ms
memory: 27088kb
input:
2 1
output:
1 1
result:
wrong output format Unexpected end of file - int32 expected