結果

問題 No.92 逃走経路
ユーザー gigurururugigurururu
提出日時 2014-12-07 21:24:13
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 191 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 11,180 KB
実行使用メモリ 23,824 KB
最終ジャッジ日時 2023-09-02 10:39:03
合計ジャッジ時間 11,200 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 82 ms
15,220 KB
testcase_02 AC 79 ms
15,020 KB
testcase_03 AC 79 ms
15,168 KB
testcase_04 AC 80 ms
15,032 KB
testcase_05 WA -
testcase_06 AC 85 ms
15,240 KB
testcase_07 AC 85 ms
15,380 KB
testcase_08 AC 81 ms
15,324 KB
testcase_09 AC 163 ms
15,432 KB
testcase_10 WA -
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def g;gets.split.map(&:to_i)end
n,m=g
l=Hash.new{[]}
m.times{
  *a,c=g
  l[c]+=[a]
}
now=*1..n
g.each{|c|now=l[c].flat_map{|a|a.select{|i|now.index(*(a-[i]))}}}
puts now.size,now*" "
0