이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
using namespace std;
int main() {
int t, n, m, l, c;
cin >> t;
while ( t-- ) {
cin >> n >> m;
cout << max( n, m ) + (min( n, m ) - 1) / 2 << "\n";
for ( l = 0; l < n; l++ ) {
for ( c = 0; c < m; c++ ) {
if ( n > m ) {
if ( c <= m / 2 )
printf( "+" );
else
printf( "-" );
} else {
if ( l <= n / 2 )
printf( "-" );
else
printf( "+" );
}
}
printf( "\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... |