#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 + c) % 2 == 0 )
cout << "+";
else
cout << "-";
}
cout << "\n";
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
in the table A+B is not equal to 2 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Wrong answer in test 2 1: 1 < 2 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
in the table A+B is not equal to 2 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
21 ms |
1372 KB |
in the table A+B is not equal to 116 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
17 ms |
1368 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 |
348 KB |
in the table A+B is not equal to 2 |
2 |
Halted |
0 ms |
0 KB |
- |