結果

問題 No.585 工夫のないパズル
ユーザー syarosyaro
提出日時 2017-12-02 15:10:38
言語 Ruby
(3.3.0)
結果
AC  
実行時間 78 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 334 ms
コンパイル使用メモリ 11,380 KB
実行使用メモリ 15,332 KB
最終ジャッジ日時 2023-08-18 19:58:43
合計ジャッジ時間 2,120 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,132 KB
testcase_01 AC 74 ms
15,292 KB
testcase_02 AC 72 ms
15,264 KB
testcase_03 AC 71 ms
15,096 KB
testcase_04 AC 71 ms
15,100 KB
testcase_05 AC 71 ms
15,280 KB
testcase_06 AC 75 ms
15,112 KB
testcase_07 AC 71 ms
15,132 KB
testcase_08 AC 71 ms
15,084 KB
testcase_09 AC 71 ms
15,080 KB
testcase_10 AC 71 ms
15,276 KB
testcase_11 AC 72 ms
15,332 KB
testcase_12 AC 76 ms
15,012 KB
testcase_13 AC 68 ms
15,276 KB
testcase_14 AC 70 ms
15,132 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

f=$<.map{|l|l.chop.bytes}
j,*X=->t{->x,y{X+=[[t ??C:?R,x,y%=4]*?\s]*-2[y];q=->{t&&f=f.transpose};q[];g=f[x];f[x]=g[4-y,4]+g[0,4-y];q[];0}}
r=j[p]
d=j[1]
12.times{|s|i=f.index{|g|j=g.index 65+s}
t=s%4
d[j,h=1[g=i-s/=4]]+r[i,n=1[m=t-j]&~h]+d[t,g+=h]+r[i+h,m-n]+d[t,-g]+d[j,-h]}
r[3,-f[3].index(77)]
3.times{|x|79-x/2<f[3][1+x%=2]&&[2,-1].map{|i|d[x,1];r[3,-1];d[x,-1];r[3,i]}}
puts X.size,X
0