結果
| 問題 | No.3067 +10 Seconds Clock |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2025-03-21 21:40:10 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 129 ms / 2,000 ms |
| + 894µs | |
| コード長 | 557 bytes |
| 記録 | |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 64,744 KB |
| 実行使用メモリ | 99,404 KB |
| 最終ジャッジ日時 | 2026-10-21 07:08:38 |
| 合計ジャッジ時間 | 4,786 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
INF = float("inf")
N, T = map(int, input().split())
t_list = list(map(int, input().split()))
K = int(input())
x_set = set(map(int, input().split()))
def check(n):
time = T
cnt = 0
for i, t in enumerate(t_list, start=1):
if cnt < n and i in x_set:
time += 10
cnt += 1
time -= t
if time <= 0:
return False
return True
ok, ng = K + 1, -1
while abs(ok - ng) > 1:
mid = (ok + ng) // 2
if check(mid):
ok = mid
else:
ng = mid
print(ok if ok <= K else -1)