結果
| 問題 |
No.459 C-VS for yukicoder
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-06-27 20:38:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,315 bytes |
| コンパイル時間 | 1,548 ms |
| コンパイル使用メモリ | 165,872 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-06-27 20:38:31 |
| 合計ジャッジ時間 | 6,889 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 45 WA * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
const int N = 3e4 + 10;
int n, m, k;
int sum[N], pos[N];
vector<int> vec[N];
bool ans[N][4][4];
int main(int argc, char const *argv[])
{
ios::sync_with_stdio(false);
cin.tie(nullptr), cout.tie(nullptr);
cin >> n >> m >> k;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
{
char c;
cin >> c;
sum[j] += (c == '#');
}
for (int i = 1; i <= k; i++)
{
cin >> pos[i];
for (int j = 1; j <= 3; j++)
if (sum[pos[i] + j])
{
sum[pos[i] + j]--;
ans[i][1][j] = 1;
break;
}
for (int j = 1; j <= 3; j++)
vec[pos[i] + j].push_back(i);
}
for (int i = 1; i <= m; i++)
for (auto id : vec[i])
{
if (!sum[i])
break;
int st = (ans[id][1][i - pos[id]] ? 2 : 1), ed = min(st + sum[i] - 1, 3);
for (int j = st; j <= ed; j++)
ans[id][j][i - pos[id]] = 1, sum[i]--;
}
for (int id = 1; id <= k; id++)
for (int i = 1; i <= 3; i++, cout << endl)
for (int j = 1; j <= 3; j++)
cout << (ans[id][i][j] ? '#' : '.');
return 0;
}
vjudge1