結果

問題 No.759 悪くない忘年会にしような!
ユーザー H3PO4H3PO4
提出日時 2021-01-21 15:09:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 769 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 10,972 KB
実行使用メモリ 32,980 KB
最終ジャッジ日時 2023-08-26 02:04:21
合計ジャッジ時間 15,869 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
8,300 KB
testcase_01 AC 14 ms
8,272 KB
testcase_02 AC 13 ms
8,340 KB
testcase_03 AC 13 ms
8,304 KB
testcase_04 WA -
testcase_05 AC 14 ms
8,368 KB
testcase_06 WA -
testcase_07 AC 14 ms
8,424 KB
testcase_08 AC 13 ms
8,340 KB
testcase_09 AC 14 ms
8,232 KB
testcase_10 AC 12 ms
8,248 KB
testcase_11 AC 13 ms
8,304 KB
testcase_12 AC 14 ms
8,220 KB
testcase_13 AC 13 ms
8,260 KB
testcase_14 WA -
testcase_15 AC 14 ms
8,252 KB
testcase_16 AC 13 ms
8,304 KB
testcase_17 AC 13 ms
8,252 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 13 ms
8,224 KB
testcase_21 WA -
testcase_22 AC 13 ms
8,308 KB
testcase_23 AC 14 ms
8,444 KB
testcase_24 AC 13 ms
8,348 KB
testcase_25 WA -
testcase_26 AC 13 ms
8,404 KB
testcase_27 AC 14 ms
8,380 KB
testcase_28 AC 13 ms
8,352 KB
testcase_29 AC 13 ms
8,256 KB
testcase_30 WA -
testcase_31 AC 14 ms
8,372 KB
testcase_32 AC 13 ms
8,224 KB
testcase_33 AC 44 ms
9,872 KB
testcase_34 AC 19 ms
8,556 KB
testcase_35 AC 30 ms
9,212 KB
testcase_36 WA -
testcase_37 AC 19 ms
8,612 KB
testcase_38 WA -
testcase_39 AC 19 ms
8,668 KB
testcase_40 WA -
testcase_41 AC 40 ms
9,824 KB
testcase_42 AC 47 ms
10,124 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 51 ms
10,436 KB
testcase_50 WA -
testcase_51 AC 52 ms
10,396 KB
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 WA -
testcase_64 WA -
testcase_65 WA -
testcase_66 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.buffer.readline

MAX = 10 ** 4 + 1


class Bit:
    """1-indexed"""

    def __init__(self, n):
        self.size = n
        self.tree = [MAX] * (n + 1)

    def min(self, i):
        m = MAX
        while i > 0:
            m = min(m, self.tree[i])
            i -= i & -i
        return m

    def update(self, i, x):
        while i <= self.size:
            self.tree[i] = min(x, self.tree[i])
            i += i & -i


N = int(input())
stores = []
for i in range(1, N + 1):
    p, t, r = map(int, input().split())
    stores.append((MAX - p, MAX - t, MAX - r, i))
stores.sort()

BIT = Bit(MAX)
ans = []
for _, t, r, i in stores:
    if BIT.min(t) >= r:
        BIT.update(t, r)
        ans.append(i)
ans.sort()
print(*ans, sep='\n')
0