結果

問題 No.497 入れ子の箱
ユーザー letrangerjpletrangerjp
提出日時 2017-11-10 19:29:51
言語 Ruby
(3.2.2)
結果
AC  
実行時間 608 ms / 5,000 ms
コード長 147 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 11,536 KB
実行使用メモリ 15,476 KB
最終ジャッジ日時 2023-08-16 02:33:54
合計ジャッジ時間 17,120 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
15,232 KB
testcase_01 AC 76 ms
15,312 KB
testcase_02 AC 76 ms
15,156 KB
testcase_03 AC 604 ms
15,232 KB
testcase_04 AC 597 ms
15,384 KB
testcase_05 AC 599 ms
15,256 KB
testcase_06 AC 600 ms
15,436 KB
testcase_07 AC 600 ms
15,292 KB
testcase_08 AC 603 ms
15,280 KB
testcase_09 AC 606 ms
15,412 KB
testcase_10 AC 600 ms
15,144 KB
testcase_11 AC 604 ms
15,316 KB
testcase_12 AC 551 ms
15,284 KB
testcase_13 AC 552 ms
15,476 KB
testcase_14 AC 549 ms
15,332 KB
testcase_15 AC 553 ms
15,424 KB
testcase_16 AC 550 ms
15,272 KB
testcase_17 AC 553 ms
15,308 KB
testcase_18 AC 605 ms
15,220 KB
testcase_19 AC 608 ms
15,220 KB
testcase_20 AC 599 ms
15,232 KB
testcase_21 AC 602 ms
15,440 KB
testcase_22 AC 597 ms
15,392 KB
testcase_23 AC 448 ms
15,452 KB
testcase_24 AC 446 ms
15,304 KB
testcase_25 AC 78 ms
15,176 KB
testcase_26 AC 77 ms
15,288 KB
testcase_27 AC 567 ms
15,420 KB
testcase_28 AC 567 ms
15,392 KB
testcase_29 AC 567 ms
15,288 KB
testcase_30 AC 500 ms
15,428 KB
testcase_31 AC 500 ms
15,236 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

_,*A=$<.map{|s|s.split.map(&:to_i).sort}
A.sort!
p (0..$.-2).map(&f=->i{$*[i]||=(0...i).map{|j|A[j].zip(A[i]).all?{|a,b|a<b}?-~f[j]:1}.max||1}).max
0