結果
問題 | No.459 C-VS for yukicoder |
ユーザー |
![]() |
提出日時 | 2016-12-10 01:10:59 |
言語 | Ruby (3.4.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 639 bytes |
コンパイル時間 | 304 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 14,464 KB |
最終ジャッジ日時 | 2024-11-28 21:02:57 |
合計ジャッジ時間 | 15,614 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 58 |
コンパイルメッセージ
Syntax OK
ソースコード
h,w,n=gets.split.map &:to_ic=[0]*wh.times do |i|g=gets.chompw.times do |i|c[i]+=1 if g[i]==?#endendd=[0]*wv=[]n.times do |i|v<< [gets.to_i,i]endv.each do |e|3.times do |i|d[e+i]+=1endendw=v.sortf=[]w.each do |e|g=[]3.times do |i|t=e[0]+id[t]-=1g<< c[t]-d[t]*3c[t]=d[t]*3endif g==[0,0,0]3.times do |i|t=e[0]+iif c[t]!=0g[i]+=1c[t]-=1breakendendendf<< g+[e[1]]endf.sort!{|a,b|a[3]<=>b[3]}f.each do |e|3.times do |i|s=""3.times do |j|s+=e[j]>=3-i ? ?#:?.endputs sendend