結果

問題 No.497 入れ子の箱
ユーザー nanaenanae
提出日時 2017-03-24 23:14:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 632 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 10,932 KB
実行使用メモリ 8,404 KB
最終ジャッジ日時 2023-09-20 03:37:46
合計ジャッジ時間 2,366 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,884 KB
testcase_01 AC 16 ms
7,784 KB
testcase_02 AC 16 ms
7,784 KB
testcase_03 AC 20 ms
8,236 KB
testcase_04 AC 21 ms
8,176 KB
testcase_05 AC 21 ms
8,308 KB
testcase_06 AC 20 ms
8,312 KB
testcase_07 AC 21 ms
8,284 KB
testcase_08 AC 20 ms
8,324 KB
testcase_09 AC 20 ms
8,256 KB
testcase_10 AC 20 ms
8,144 KB
testcase_11 AC 21 ms
8,256 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 20 ms
8,180 KB
testcase_24 AC 20 ms
8,256 KB
testcase_25 AC 16 ms
7,908 KB
testcase_26 AC 17 ms
7,780 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 21 ms
8,128 KB
testcase_31 AC 21 ms
8,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

def solve():
    N = int(input())
    hako = [sorted([int(i) for i in input().split()]) for j in range(N)]
    hako.sort(key=max)
    ans = 1

    l = 0

    while l < N - 1:
        for j in range(l + 1, N):
            for i in range(3):
                if hako[j][i] <= hako[l][i]:
                    break
            else:
                ans += 1
                break

        l = j

    print(ans)

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

if __name__ == '__main__':
    solve()
0