#include <bits/stdc++.h>
#define sz(x) (long long)x.size()
using namespace std;
//mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int N = 1e5 + 5, M = 1e6 + 7, SM = 1e3 + 5, logN = 20;
const long long MOD = 1e9 + 7, INF = 1e18 + 9;
const int dx[] = {1, 0, 0, -1, -1, 1, -1, 1};
const int dy[] = {0, 1, -1, 0, -1, 1, 1, -1};
void debug() {
cerr << "\n";
}
template<typename Head, typename... Tail>
void debug(Head a, Tail... b) {
cerr << a << " ";
debug(b...);
}
int main() {
//freopen(".in", "r", stdin);
//freopen(".out", "w", stdout);
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
long long q; cin >> q;
while(q--) {
long long n, m; cin >> n >> m;
if(n == m) {
if(n & 1) {
cout << n + m / 2 << "\n";
for(long long i = 1; i <= n; i++) {
for(long long j = 1; j <= m; j++) {
if(i & 1) {
cout << "-";
}
else {
if(j <= m / 2) {
cout << "-";
}
else {
cout << "+";
}
}
}
cout << "\n";
}
}
else {
cout << m << "\n";
for(long long i = 1; i <= n; i++) {
for(long long j = 1; j <= m; j++) {
cout << "+";
}
cout << "\n";
}
}
}
else {
}
}
cout << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
in the table A+B is not equal to 4 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Wrong answer |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
in the table A+B is not equal to 4 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
Wrong answer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
32 ms |
1388 KB |
Wrong answer in test 24 24: 24 < 44 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
in the table A+B is not equal to 4 |
2 |
Halted |
0 ms |
0 KB |
- |