結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
Kude
|
| 提出日時 | 2025-03-21 21:30:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 388 bytes |
| コンパイル時間 | 234 ms |
| コンパイル使用メモリ | 82,672 KB |
| 実行使用メモリ | 115,072 KB |
| 最終ジャッジ日時 | 2025-03-21 21:30:12 |
| 合計ジャッジ時間 | 3,337 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 3 |
ソースコード
n, t = map(int, input().split())
a = list(map(int, input().split()))
itm = [0] * n
input()
for x in map(int, input().split()):
itm[x - 1] = 1
now = 0
ans = 0
for i in range(n - 1):
# 10*use+t > ti
# use>(ti-t)/10
now += itm[i]
use = max(0, (a[i] - t) // 10 + 1)
if use > now:
ans = -1
break
ans += use
t += 10 * use
t -= a[i]
print(ans)
Kude