結果

問題 No.38 赤青白ブロック
ユーザー letrangerjpletrangerjp
提出日時 2017-06-14 12:13:25
言語 Ruby
(3.2.2)
結果
AC  
実行時間 254 ms / 5,000 ms
コード長 194 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 11,488 KB
実行使用メモリ 16,344 KB
最終ジャッジ日時 2023-08-25 01:23:02
合計ジャッジ時間 4,356 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
外部呼び出し有り
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
15,312 KB
testcase_01 AC 182 ms
16,088 KB
testcase_02 AC 103 ms
15,540 KB
testcase_03 AC 89 ms
15,224 KB
testcase_04 AC 84 ms
15,060 KB
testcase_05 AC 81 ms
15,160 KB
testcase_06 AC 146 ms
16,248 KB
testcase_07 AC 106 ms
15,600 KB
testcase_08 AC 82 ms
15,040 KB
testcase_09 AC 151 ms
16,344 KB
testcase_10 AC 81 ms
15,092 KB
testcase_11 AC 82 ms
15,068 KB
testcase_12 AC 82 ms
15,072 KB
testcase_13 AC 82 ms
15,204 KB
testcase_14 AC 82 ms
15,296 KB
testcase_15 AC 95 ms
15,468 KB
testcase_16 AC 123 ms
15,640 KB
testcase_17 AC 90 ms
15,296 KB
testcase_18 AC 113 ms
15,604 KB
testcase_19 AC 101 ms
15,460 KB
testcase_20 AC 94 ms
15,304 KB
testcase_21 AC 88 ms
15,416 KB
testcase_22 AC 254 ms
16,176 KB
testcase_23 AC 85 ms
15,068 KB
testcase_24 AC 117 ms
16,268 KB
testcase_25 AC 87 ms
15,320 KB
testcase_26 AC 91 ms
15,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

eval"R,B=%d,%d
D={}
f=->s{n=s.size
D[s]||=$.<n&&(0...n).any?{|i|s[i]<?R?i-B>=0&&s[i-B]<?R:s[i]<?W&&i-R>=0&&s[i-R]==?R}?n.times{|i|s[i]>?R||f[s[0,i]+s[i+1,n]]}:n>$.&&$.=n}
f['%s']
p$."%`dd`.split
0