結果
問題 |
No.459 C-VS for yukicoder
|
ユーザー |
![]() |
提出日時 | 2016-12-12 12:55:20 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 724 bytes |
コンパイル時間 | 548 ms |
コンパイル使用メモリ | 56,896 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-29 15:51:26 |
合計ジャッジ時間 | 8,237 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 20 WA * 38 |
ソースコード
//No Debuged #include <iostream> #include <string> using namespace std; int h, w, n; int c[10000]; int a[10000]; void input() { cin >> h >> w >> n; for (int i = 0; i < h; i++) { string s; cin >> s; for (int j = 0; j < w; j++) { if (s[j] == '#' && a[j] == 0) { a[j] = h - i; } } } for (int i = 0; i < n; i++) { cin >> c[i]; } } void drop(int turn) { int num[3]; for (int i = 0; i < 3; i++) { num[i] = min(a[c[turn] + i], 3); a[c[turn] + i] -= num[i]; } for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (i + 1 <= num[j]) { cout << "#"; } else { cout << "."; } } cout << endl; } } int main() { input(); for (int i = 0; i < n; i++) { drop(i); } return 0; }