QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#204360#6743. water235kiwiHM#WA 3ms27088kbC++20785b2023-10-07 10:29:452023-10-07 10:29:46

Judging History

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

  • [2023-10-07 10:29:46]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:27088kb
  • [2023-10-07 10:29:45]
  • 提交

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