結果
| 問題 |
No.497 入れ子の箱
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-25 00:42:18 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 495 bytes |
| コンパイル時間 | 71 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-07-06 03:19:54 |
| 合計ジャッジ時間 | 1,903 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 24 |
ソースコード
def calc_score(box, i):
global score
for j in range(i+1, len(box)):
if box[i][0] < box[j][0] and box[i][1] < box[j][1] and box[i][2] < box[j][2]:
score[j] = max(score[j], score[i] + 1)
return
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):
if score[i] == 1:
calc_score(box, i)
print(max(score))