#include <bits/stdc++.h>
using namespace std;
void solution () {
int n, m;
cin >> n >> m;
char arr[n][m];
cout << n + n/2 << "\n";
if (n < m) {
swap(n, m);
}
for (int i = 0; i < m; i++) {
for (int j = 0, a = n/2+1; j < n; j++, a--) {
if (a != 0) {
arr[i][j] = '+';
}else {
arr[i][j] = '-';
}
cout << arr[i][j];
}
cout << "\n";
}
}
int main () {
ios::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
while (t--) solution();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
364 KB |
in the table A+B is not equal to 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Wrong answer in test 3 45: 4 < 46 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
364 KB |
in the table A+B is not equal to 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
34 ms |
1388 KB |
Wrong answer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
36 ms |
1388 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 |
2 ms |
364 KB |
in the table A+B is not equal to 1 |
2 |
Halted |
0 ms |
0 KB |
- |