結果

問題 No.497 入れ子の箱
ユーザー cielciel
提出日時 2017-04-24 00:46:05
言語 Ruby
(3.3.0)
結果
AC  
実行時間 406 ms / 5,000 ms
コード長 205 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 11,280 KB
実行使用メモリ 15,424 KB
最終ジャッジ日時 2023-09-29 16:16:50
合計ジャッジ時間 14,280 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,232 KB
testcase_01 AC 78 ms
15,224 KB
testcase_02 AC 74 ms
15,224 KB
testcase_03 AC 384 ms
15,308 KB
testcase_04 AC 373 ms
15,232 KB
testcase_05 AC 375 ms
15,328 KB
testcase_06 AC 371 ms
15,252 KB
testcase_07 AC 365 ms
15,424 KB
testcase_08 AC 377 ms
15,132 KB
testcase_09 AC 377 ms
15,076 KB
testcase_10 AC 367 ms
15,248 KB
testcase_11 AC 371 ms
15,272 KB
testcase_12 AC 381 ms
15,208 KB
testcase_13 AC 384 ms
15,368 KB
testcase_14 AC 371 ms
15,304 KB
testcase_15 AC 375 ms
15,232 KB
testcase_16 AC 368 ms
15,304 KB
testcase_17 AC 385 ms
15,016 KB
testcase_18 AC 365 ms
15,120 KB
testcase_19 AC 372 ms
15,312 KB
testcase_20 AC 377 ms
15,116 KB
testcase_21 AC 371 ms
15,208 KB
testcase_22 AC 386 ms
15,116 KB
testcase_23 AC 298 ms
15,380 KB
testcase_24 AC 328 ms
15,256 KB
testcase_25 AC 73 ms
15,116 KB
testcase_26 AC 73 ms
15,080 KB
testcase_27 AC 386 ms
15,120 KB
testcase_28 AC 393 ms
15,228 KB
testcase_29 AC 380 ms
15,172 KB
testcase_30 AC 396 ms
15,348 KB
testcase_31 AC 406 ms
15,224 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/usr/bin/ruby
#aizu0157
n=gets.to_i
a=n.times.map{gets.split.map(&:to_i).sort}.sort
d=[]
n.times{|i|
	d[i]=1
	i.times{|j|
		if (0..2).all?{|x|a[j][x]<a[i][x]}
			d[i]=[d[j]+1,d[i]].max
		end
	}
}
p d.max
0