| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1359814 | iamhereforfun | Red-blue table (IZhO19_stones) | C++20 | 5 ms | 1364 KiB |
// Starcraft 2 enjoyer //
#include <bits/stdc++.h>
// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
using namespace std;
#define LSOne(X) ((X) & -(X))
const int N = 3e5 + 5;
const int M = 1 << 10 + 5;
const int B = 18;
const long long K = 2;
const int LG = 60;
const long long INF = 1e18 + 5;
const int C = 26;
const int MOD = 1e9 + 7;
int n, m;
inline void solve()
{
cin >> n >> m;
if ((n - 1) / 2 + m > n / 2 + (m - 1) / 2)
{
cout << (n - 1) / 2 + m << "\n";
for (int x = 0; x < n - (n - 1) / 2; x++)
{
for (int y = 0; y < m; y++)
{
cout << '-';
}
cout << "\n";
}
for (int x = 0; x < (n - 1) / 2; x++)
{
for (int y = 0; y < m; y++)
{
cout << '+';
}
cout << "\n";
}
}
else
{
cout << n / 2 + (m - 1)/2 << "\n";
for(int x = 0; x < n; x++)
{
for(int y = 0; y < m; y++)
{
if(y < (m - 1)/2)
{
cout << '-';
}
else
{
cout << '+';
}
}
cout << "\n";
}
}
}
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
cin >> t;
for (int x = 1; x <= t; x++)
{
solve();
}
return 0;
}
| # | 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... | ||||
