#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
cin >> t;
for ( ; t > 0; t-- ) {
int n, m;
cin >> n >> m;
cout << n + m - 2 << "\n";
for ( int l = 0; l < n; l++ ) {
for ( int c = 0; c < m; c++ ) {
if ( l == n - 1 )
cout << "-";
else {
if ( l < n / 2 ) {
if ( c <= m / 2 )
cout << '+';
else
cout << "-";
} else {
if ( c < m / 2 )
cout << "-";
else
cout << "+";
}
}
}
cout << "\n";
}
return n;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
348 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
348 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
348 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
344 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
0 ms |
348 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |