結果
| 問題 |
No.814 ジジ抜き
|
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2020-03-25 02:06:01 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 553 bytes |
| コンパイル時間 | 303 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 78,320 KB |
| 最終ジャッジ日時 | 2025-01-01 19:15:50 |
| 合計ジャッジ時間 | 22,372 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 MLE * 13 |
ソースコード
#!/usr/bin/ python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
N = int(readline())
KLD = np.array(read().split(), np.int64)
K = KLD[::3]
L = KLD[1::3]
D = KLD[2::3]
D = 1 << D
def test(x):
# x 以下が奇数個ある
return np.minimum(K, np.maximum(0, (x - L) // D + 1)).sum() % 2 == 1
left = -1
right = 10 ** 18 + 10
while left + 1 < right:
x = (left + right) // 2
if test(x):
right = x
else:
left = x
print(right)
maspy