結果
| 問題 | No.3731 Kaleidoscope |
| コンテスト | |
| ユーザー |
テナガザル
|
| 提出日時 | 2026-09-19 17:42:52 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 1,028 bytes |
| 記録 | |
| コンパイル時間 | 1,132 ms |
| コンパイル使用メモリ | 171,368 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-19 17:43:06 |
| 合計ジャッジ時間 | 5,013 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 3 RE * 28 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
const int b = 1000;
string s;
cin >> s;
int n = 11;
vector<string> bs(n, string(n - 3, '.'));
if (s.size() % 2 == 1) s.push_back('o');
for (int i = 0; i + 1 < n - 3; i += 2)
{
for (int j = 0; j <= i / 2; ++j)
{
bs[i + 1][j] = '#';
bs[j + 1][i] = '#';
}
for (int j = 0; j < i / 2; ++j)
{
bs[i / 2 + j + 1][i - j] = '#';
}
}
vector<string> ts(n, string(3, '.'));
ts[n - 1][0] = ts[n - 1][1] = '#';
for (int i = 0; i + 1 < s.size(); i += 2)
{
if (s[i] == 'x')
{
ts[i * 2][1] = '#';
}
if (s[i + 1] == 'x')
{
ts[i * 2 + 1][0] = '#';
}
}
vector<string> ans(n, string(n, '.'));
for (int i = 0; i < n; ++i)
{
reverse(bs[i].begin(), bs[i].end());
ans[i] = bs[i] + ts[i];
}
for (int i = 0; i < n; ++i)
{
if (ans[1][i] == '#') break;
ans[1][i] = '#';
}
for (int i = 0; i < n; ++i) cout << ans[i] << endl;
}
テナガザル