結果
| 問題 | No.3067 +10 Seconds Clock |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:43:25 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 83 ms / 2,000 ms |
| + 2µs | |
| コード長 | 389 bytes |
| 記録 | |
| コンパイル時間 | 2,826 ms |
| コンパイル使用メモリ | 64,036 KB |
| 実行使用メモリ | 93,184 KB |
| 最終ジャッジ日時 | 2026-11-11 04:38:15 |
| 合計ジャッジ時間 | 4,984 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
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)