結果
| 問題 |
No.459 C-VS for yukicoder
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-06-23 11:19:34 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,012 bytes |
| コンパイル時間 | 2,502 ms |
| コンパイル使用メモリ | 171,096 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-06-23 11:19:47 |
| 合計ジャッジ時間 | 10,089 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 32 RE * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N=1e4+5;
int h,w,n;
char c;
int a[N],p[N];
bool f[N];
char ans[N][4][4];
int tp[N][4];
struct T{
int id,l;
bool operator <(const T&x) const{
return f[id]>f[x.id];
}
};
priority_queue<T> b[N];
signed main(){
// freopen("tetris.in","r",stdin);
// freopen("tetris.out","w",stdout);
cin>>h>>w>>n;
for (int i=1;i<=h;i++){
for (int j=1;j<=w;j++){
cin>>c;
if(c=='#') a[j]++;
}
}
for (int i=1;i<=n;i++){
cin>>p[i]; p[i]++;
b[p[i]].push({i,1});
b[p[i]+1].push({i,2});
b[p[i]+2].push({i,3});
for (int j=1;j<=3;j++){
for (int k=1;k<=3;k++){
ans[i][j][k]='.';
}
}
}
for (int i=1;i<=w;i++){
for (int j=1;j<=a[i];j++){
int id=b[i].top().id,l=b[i].top().l;
b[i].pop();
ans[id][++tp[id][l]][l]='#';
if(tp[id][l]!=3){
b[i].push({id,l});
}
}
}
for (int i=1;i<=n;i++){
for (int j=1;j<=3;j++){
for (int k=1;k<=3;k++){
cout<<ans[i][j][k];
}
cout<<'\n';
}
}
return 0;
}
vjudge1