結果
| 問題 | No.3067 +10 Seconds Clock |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:43:25 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 83 ms / 2,000 ms |
| + 175µs | |
| コード長 | 389 bytes |
| 記録 | |
| コンパイル時間 | 84 ms |
| コンパイル使用メモリ | 64,672 KB |
| 実行使用メモリ | 93,908 KB |
| 最終ジャッジ日時 | 2026-10-21 07:09:10 |
| 合計ジャッジ時間 | 3,694 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
n, t = map(int, input().split())
a = list(map(int, input().split()))
k = int(input())
x = list(map(int, input().split()))
x.reverse()
cnt = 0
for i in range(n-1):
t -= a[i]
if t <= 0 and cnt < -((t-1)//10):
exit(print(-1))
if t <= 0:
l = -((t-1)//10)
cnt -= l
t += l*10
if x and x[-1] == i+2:
cnt += 1
x.pop()
print(k - cnt)