結果

問題 No.585 工夫のないパズル
ユーザー syarosyaro
提出日時 2017-12-02 12:55:38
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 458 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 11,484 KB
実行使用メモリ 15,472 KB
最終ジャッジ日時 2023-08-18 19:57:41
合計ジャッジ時間 4,021 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

f=$<.map{|l|l.chop.bytes}
t=->x,y{g=f[x];f[x]=g[y,4]+g[0,y]}
r=->r,a{$><<"R #{r} #{a%=4}\n"*-2[a];t[r,4-a]}
d=->c,b{$><<"C #{c} #{b%=4}\n"*-2[b];f=f.transpose;t[c,4-b];f=f.transpose}
w=->x{2.times{|i|d[x,1];r[3,-1];d[x,-1];r[3,2-3*i]}}
j=3.times{|s|4.times{|t|i=f.index{|g|j=g.index 65+s*4+t}
g=i-s
j==t&&r[i,1]+d[t,g]+r[i,3]+d[t,-g]||d[j,h=1[g]]+d[t,g+h]+r[i+h,t-j]+d[t,-g-h]+d[j,-h]}}
r[3,-f[3].index(77)]
f[3][1]>79&&w[0]
f[3][2]>79&&w[1]
f[3][1]>78&&w[0]
0