Submission #522310

# Submission time Handle Problem Language Result Execution time Memory
522310 2022-02-04T14:56:08 Z LucaIlie Red-blue table (IZhO19_stones) C++17
27 / 100
25 ms 1228 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 ) - 1) / 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" );
        }
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 296 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Correct 2 ms 296 KB Output is correct
4 Incorrect 2 ms 332 KB Wrong answer in test 5 29: 31 < 32
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 1228 KB Wrong answer in test 97 21: 107 < 116
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 24 ms 1204 KB Wrong answer in test 24 24: 35 < 44
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 0 ms 292 KB Output is correct
3 Correct 2 ms 296 KB Output is correct
4 Incorrect 2 ms 332 KB Wrong answer in test 5 29: 31 < 32
5 Halted 0 ms 0 KB -