Submission #522299

# Submission time Handle Problem Language Result Execution time Memory
522299 2022-02-04T14:36:09 Z LucaIlie Red-blue table (IZhO19_stones) C++17
0 / 100
26 ms 1188 KB
#include <iostream>

using namespace std;

int main() {
    int t, n, m, l, c;

    cin >> t;
    while ( t-- ) {
        cin >> n >> m;

        cout << max( n, m ) + min( n, m ) / 2 << "\n";
        for ( l = 0; l < n; l++ ) {
            for ( c = 0; c < m; c++ ) {
                if ( n > m ) {
                    if ( c <= m / 2 )
                        printf( "-" );
                    else
                        printf( "+" );
                } else {
                    if ( l <= n / 2 )
                        printf( "+" );
                    else
                        printf( "-" );
                }
            }
            printf( "\n" );
        }
        printf( "\n" );
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 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 204 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 3
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 1188 KB in the table A+B is not equal to 107
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 1160 KB in the table A+B is not equal to 36
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 3
2 Halted 0 ms 0 KB -