QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#361574#6743. water235Susie_Rain#WA 0ms3584kbC++20659b2024-03-23 11:39:462024-03-23 11:39:47

Judging History

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

  • [2024-03-23 11:39:47]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3584kb
  • [2024-03-23 11:39:46]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

void solve(){
    int n , m;
    cin >> n >> m;
    vector<vector<int>> a(n+1,vector<int>(m+1));
    for(int i=1;i<=m;i+=2){
        a[1][i] = 1;
    }
    if(m % 2 == 0){
        a[1][m] = 1;
    }
    if(n%2==0){
        a[n][1] = 1;
    }
    for(int i=3;i<=n;i+=2){
        a[i][1] = 1;
    }
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            cout << a[i][j] << ' ';
        }
        cout << '\n';
    }

}
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int tt = 1;
//    cin >> tt;
    while (tt--) solve();
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3584kb

input:

2 1

output:

1 
1 

result:

wrong output format Unexpected end of file - int32 expected