結果

問題 No.814 ジジ抜き
ユーザー tktk_snsntktk_snsn
提出日時 2021-04-28 22:11:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 433 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 10,724 KB
実行使用メモリ 48,216 KB
最終ジャッジ日時 2023-09-22 04:28:04
合計ジャッジ時間 7,677 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,936 KB
testcase_01 AC 17 ms
7,836 KB
testcase_02 AC 17 ms
7,928 KB
testcase_03 AC 82 ms
8,320 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

N = int(input())
KLD = tuple(tuple(map(int, input().split())) for _ in range(N))


def F(x):
    cnt = 0
    for k, l, d in KLD:
        if x < l:
            continue
        i = 1 + (x-l)//pow(2, d)
        cnt += min(i, k)
    return cnt % 2


l = -1
r = 10**18
while r-l > 1:
    m = (r+l)//2
    if F(m):
        r = m
    else:
        l = m
print(r)
0