結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,960 KB
testcase_01 AC 16 ms
7,844 KB
testcase_02 AC 16 ms
7,896 KB
testcase_03 AC 20 ms
8,368 KB
testcase_04 AC 20 ms
8,372 KB
testcase_05 AC 20 ms
8,308 KB
testcase_06 AC 20 ms
8,312 KB
testcase_07 AC 20 ms
8,228 KB
testcase_08 AC 21 ms
8,276 KB
testcase_09 AC 20 ms
8,292 KB
testcase_10 AC 20 ms
8,236 KB
testcase_11 AC 20 ms
8,368 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 19 ms
8,288 KB
testcase_24 AC 19 ms
8,356 KB
testcase_25 AC 16 ms
7,824 KB
testcase_26 AC 15 ms
7,868 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 20 ms
8,184 KB
testcase_31 AC 20 ms
8,368 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()
    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