Submission #344034

# Submission time Handle Problem Language Result Execution time Memory
344034 2021-01-05T04:56:41 Z koketsu Red-blue table (IZhO19_stones) C++14
0 / 100
35 ms 1388 KB
#include <bits/stdc++.h>
#define pb push_back
#define LL long long
#define Kultivator ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

using namespace std;

const LL Mxn = 1e6 + 7;
const LL Mod = 1e9 + 7;
const LL Inf = 1e14 + 7;

int main() {
    Kultivator;
    int tt;
    cin >> tt;
    while(tt--){
        int N, M;
        cin >> N >> M;
        if(min(N, M) == 1){
            cout << max(N, M) << '\n';
            for(int i = 1; i <= N; i++){
                for(int j = 1; j <= M; j++){
                    if(N == 1){
                        cout << '+';
                    } else {
                        cout << '-';
                    }
                }
                cout << '\n';
            }
        }
        cout << max(N, M) + 1 << '\n';
        if(N <= M){
            for(int i = 1; i <= N; i++){
                for(int j = 1; j <= M; j++){
                    if(j == N){
                        cout << '-';
                    } else {
                        cout << '+';
                    }
                }
                cout << '\n';
            }
        } else {
            for(int i = 1; i <= N; i++){
                for(int j = 1; j <= M; j++){
                    if(j == N){
                        cout << '+';
                    } else {
                        cout << '-';
                    }
                }
                cout << '\n';
            }
        }
        cout << '\n';
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB in the table A+B is not equal to 3
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 364 KB in the table A+B is not equal to 46
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB in the table A+B is not equal to 3
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 35 ms 1388 KB in the table A+B is not equal to 98
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 35 ms 1388 KB Wrong answer in test 24 24: 25 < 44
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB in the table A+B is not equal to 3
2 Halted 0 ms 0 KB -