結果

問題 No.459 C-VS for yukicoder
ユーザー cielciel
提出日時 2016-12-12 14:11:38
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 349 bytes
コンパイル時間 527 ms
コンパイル使用メモリ 11,176 KB
実行使用メモリ 19,772 KB
最終ジャッジ日時 2023-08-19 20:25:33
合計ジャッジ時間 15,004 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,132 KB
testcase_01 AC 76 ms
15,220 KB
testcase_02 RE -
testcase_03 AC 77 ms
15,044 KB
testcase_04 AC 76 ms
15,144 KB
testcase_05 AC 79 ms
15,140 KB
testcase_06 RE -
testcase_07 AC 77 ms
15,076 KB
testcase_08 RE -
testcase_09 AC 78 ms
15,264 KB
testcase_10 AC 77 ms
15,044 KB
testcase_11 WA -
testcase_12 AC 78 ms
15,204 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 AC 83 ms
15,452 KB
testcase_16 RE -
testcase_17 AC 79 ms
15,044 KB
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 AC 114 ms
18,384 KB
testcase_26 AC 121 ms
17,952 KB
testcase_27 AC 110 ms
17,092 KB
testcase_28 AC 110 ms
16,872 KB
testcase_29 AC 171 ms
18,104 KB
testcase_30 AC 119 ms
17,728 KB
testcase_31 RE -
testcase_32 AC 86 ms
16,412 KB
testcase_33 RE -
testcase_34 RE -
testcase_35 AC 89 ms
17,132 KB
testcase_36 RE -
testcase_37 AC 88 ms
16,660 KB
testcase_38 RE -
testcase_39 AC 88 ms
16,932 KB
testcase_40 RE -
testcase_41 AC 84 ms
15,924 KB
testcase_42 RE -
testcase_43 AC 133 ms
17,788 KB
testcase_44 RE -
testcase_45 RE -
testcase_46 AC 92 ms
17,344 KB
testcase_47 AC 91 ms
16,688 KB
testcase_48 AC 135 ms
17,436 KB
testcase_49 AC 88 ms
16,848 KB
testcase_50 RE -
testcase_51 AC 88 ms
16,612 KB
testcase_52 RE -
testcase_53 RE -
testcase_54 RE -
testcase_55 AC 100 ms
16,876 KB
testcase_56 RE -
testcase_57 AC 87 ms
16,680 KB
testcase_58 RE -
testcase_59 RE -
testcase_60 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - w
Syntax OK

ソースコード

diff #

h,w,n=gets.split.map(&:to_i)
s=h.times.map{gets.chomp.chars}.transpose.map{|e|h-(e.index('#')||h)}
c=n.times.map{gets.to_i}
c.each{|e|s[e]-=1}
c0=c.map{[1,0,0]}
(0...n).sort_by{|e|c[e]}.each{|i|
	3.times{|j|
		dec=[j==0 ? 2 : 3,s[c[i]+j]].min
		s[c[i]+j]-=dec
		c0[i][j]+=dec
	}
}
c0.each{|e|puts e.map{|f|['.']*(3-f)+['#']*f}.transpose.map(&:join)}
0