This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |