| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1357586 | ivaziva | Red-blue table (IZhO19_stones) | C++20 | 14 ms | 1500 KiB |
#include <bits/stdc++.h>
using namespace std;
#define MAXN 1001
#define int long long
int n,m,t;
char a[MAXN][MAXN];
int32_t main()
{
cin>>t;
for (int test=0;test<t;test++)
{
cin>>n>>m;
if (n<=m)
{
int target=(n+2)/2;
for (int row=1;row<=target;row++)
{
for (int col=1;col<=m;col++) a[row][col]='-';
}
for (int row=target+1;row<=n;row++)
{
for (int col=1;col<=m;col++) a[row][col]='+';
}
}
else
{
int target=(m+2)/2;
for (int col=1;col<=target;col++)
{
for (int row=1;row<=n;row++) a[row][col]='+';
}
for (int col=target+1;col<=m;col++)
{
for (int row=1;row<=n;row++) a[row][col]='-';
}
}
cout<<max(n,m)+(min(n,m)-1)/2<<endl;
for (int row=1;row<=n;row++)
{
for (int col=1;col<=m;col++) cout<<a[row][col];
cout<<endl;
}
}
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
