結果
| 問題 | No.3067 +10 Seconds Clock |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:42:43 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 97 ms / 2,000 ms |
| + 390µs | |
| コード長 | 429 bytes |
| 記録 | |
| コンパイル時間 | 397 ms |
| コンパイル使用メモリ | 64,416 KB |
| 実行使用メモリ | 99,252 KB |
| 最終ジャッジ日時 | 2026-10-21 07:08:58 |
| 合計ジャッジ時間 | 4,511 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
n,rest=map(int,input().split())
t=list(map(int,input().split()))
k=int(input())
p=set(map(int,input().split()))
need=(sum(t)-rest+1+9)//10
if need>k:
print(-1)
exit()
cnt=0
for i in range(n-1):
if rest>t[i]:
rest-=t[i]
if i+2 in p:
rest+=10
cnt+=1
if cnt==need:
print(need)
exit()
else:
print(-1)
exit()
print(0)