結果

問題 No.497 入れ子の箱
ユーザー kohei2019kohei2019
提出日時 2022-02-03 23:35:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 169 ms / 5,000 ms
コード長 385 bytes
コンパイル時間 1,692 ms
コンパイル使用メモリ 86,596 KB
実行使用メモリ 78,308 KB
最終ジャッジ日時 2023-09-02 03:22:23
合計ジャッジ時間 7,778 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
71,788 KB
testcase_01 AC 88 ms
71,728 KB
testcase_02 AC 83 ms
71,732 KB
testcase_03 AC 167 ms
77,964 KB
testcase_04 AC 154 ms
77,936 KB
testcase_05 AC 156 ms
78,032 KB
testcase_06 AC 153 ms
78,200 KB
testcase_07 AC 156 ms
78,308 KB
testcase_08 AC 158 ms
78,184 KB
testcase_09 AC 157 ms
78,116 KB
testcase_10 AC 158 ms
78,108 KB
testcase_11 AC 151 ms
77,904 KB
testcase_12 AC 143 ms
78,056 KB
testcase_13 AC 146 ms
77,892 KB
testcase_14 AC 147 ms
78,240 KB
testcase_15 AC 147 ms
77,916 KB
testcase_16 AC 150 ms
78,208 KB
testcase_17 AC 146 ms
78,280 KB
testcase_18 AC 162 ms
78,220 KB
testcase_19 AC 167 ms
78,140 KB
testcase_20 AC 169 ms
78,084 KB
testcase_21 AC 164 ms
78,168 KB
testcase_22 AC 166 ms
78,184 KB
testcase_23 AC 108 ms
77,248 KB
testcase_24 AC 106 ms
77,432 KB
testcase_25 AC 86 ms
71,684 KB
testcase_26 AC 89 ms
71,796 KB
testcase_27 AC 155 ms
78,284 KB
testcase_28 AC 153 ms
77,916 KB
testcase_29 AC 159 ms
78,088 KB
testcase_30 AC 120 ms
77,792 KB
testcase_31 AC 130 ms
77,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
N = int(input())
lsXYZ = [list(sorted(list(map(int,input().split())))) for i in range(N)]
lsXYZ.sort(reverse=True)
d = collections.defaultdict(lambda:0)

for i in range(N):
    x,y,z = lsXYZ[i]
    k = 1
    for key in d.keys():
        x1,y1,z1 = key
        if x1 > x and y1 > y and z1 >z:
            k = max(k,d[key]+1)
    d[(x,y,z)] = k

print(max(d.values()))
0