結果
問題 | No.497 入れ子の箱 |
ユーザー |
|
提出日時 | 2017-03-25 00:50:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 404 ms / 5,000 ms |
コード長 | 381 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-07-06 03:22:16 |
合計ジャッジ時間 | 9,390 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
N = int(input())box = []for i in range(N):tmp = list(map(int, input().split()))tmp.sort()box.append(tmp)box.sort(key=lambda x:x[2])score = [1 for i in range(N)]for i in range(N):for j in range(i):if box[i][0] > box[j][0] and box[i][1] > box[j][1] and box[i][2] > box[j][2]:score[i] = max(score[j] + 1, score[i])print(max(score))