結果

問題 No.3067 +10 Seconds Clock
コンテスト
ユーザー miho-4
提出日時 2025-03-21 23:24:04
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 271 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 224 ms
コンパイル使用メモリ 95,728 KB
実行使用メモリ 140,704 KB
最終ジャッジ日時 2026-07-07 18:55:56
合計ジャッジ時間 3,719 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n,T=map(int,input().split())
L=list(map(int,input().split()))
k=int(input())
A=list(map(int,input().split()))
S=set(A)
cnt=0
ans=0
for i in range(n-1):
	T-=L[i]
	while 0<cnt and T<=0:
		cnt-=1
		T+=10
		ans+=1
	if i+2 in S:
		cnt+=1
	if T<=0:
		exit(print(-1))
print(ans)
0