結果
| 問題 | No.3067 +10 Seconds Clock |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-24 19:29:51 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 120 ms / 2,000 ms |
| コード長 | 430 bytes |
| 記録 | |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 140,732 KB |
| 最終ジャッジ日時 | 2026-07-07 21:10:46 |
| 合計ジャッジ時間 | 3,926 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
n, T = map(int, input().split())
t = list(map(int, input().split()))
K = int(input())
x = list(map(int, input().split()))
X = set(x)
ans = cnt = 0
for i in range(n-1):
if T > 0:
T -= t[i]
while 0 < cnt and T <= 0:
cnt -= 1
T += 10
ans += 1
if i + 2 in X:
cnt += 1
if T <= 0:
print(-1)
break
else:
print(ans)