| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1338323 | poapaa. | Red-blue table (IZhO19_stones) | C++20 | 11 ms | 1244 KiB |
#include <iostream>
#include <vector>
using namespace std;
void solve() {
int n, m, i, j;
cin >> n >> m;
if( n > m ) {
cout << m + n - ( m / 2 + 1 ) << '\n';
for( i = 0; i < n; i++ ) {
for( j = 0; j < m; j++ ) {
if( i < m / 2 + 1 )
if( i <= j )
cout << '-';
else
cout << '+';
else
cout << '-';
}
cout << '\n';
}
} else {
cout << n + m - ( n / 2 + 1 ) << '\n';
for( i = 0; i < n; i++ ) {
for( j = 0; j < m; j++ ) {
if( j < n / 2 + 1 ) {
if( i >= j )
cout << '+';
else
cout << '-';
} else {
cout << '+';
}
}
cout << '\n';
}
}
}
int main() {
int t;
cin >> t;
while( t-- ) {
solve();
}
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... | ||||
