Submission #532487

# Submission time Handle Problem Language Result Execution time Memory
532487 2022-03-03T03:08:20 Z dannyboy20031204 Red-blue table (IZhO19_stones) C++17
0 / 100
27 ms 1332 KB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void db() {cout << '\n';}
template <typename T, typename ...U> void db(T a, U ...b){
    cout << a << ' ', db(b...);
}
void solve(){
    int n, m;
    cin >> n >> m;
    char ans[n][m];
    for (int i = 0; i < n - 1; i++) for (int j = 0; j < m - 1; j++) ans[i][j] = (i + j) % 2 ? '+' : '-';
    for (int i = 0; i < n; i++) ans[i][m - 1] = '+';
    for (int j = 0; j < m; j++) ans[n - 1][j] = '-';
    cout << n - 1 + m - 1 << '\n';
    for (auto &i : ans){
        for (char j : i) cout << j;
        cout << '\n';
    }
}
int main(){
    ios::sync_with_stdio(0), cin.tie(0);
    int t;
    cin >> t;
    while (t--) solve();
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB in the table A+B is not equal to 2
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Wrong answer in test 2 1: 1 < 2
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB in the table A+B is not equal to 2
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 27 ms 1332 KB in the table A+B is not equal to 76
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 1204 KB in the table A+B is not equal to 46
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB in the table A+B is not equal to 2
2 Halted 0 ms 0 KB -