QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#361574 | #6743. water235 | Susie_Rain# | WA | 0ms | 3584kb | C++20 | 659b | 2024-03-23 11:39:46 | 2024-03-23 11:39:47 |
Judging History
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