#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 |
Incorrect |
0 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 |
1 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 |
0 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 |
28 ms |
1256 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 |
28 ms |
1160 KB |
in the table A+B is not equal to 35 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
in the table A+B is not equal to 3 |
2 |
Halted |
0 ms |
0 KB |
- |