結果

問題 No.3067 +10 Seconds Clock
ユーザー friedrice
提出日時 2025-02-12 14:54:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 12,160 KB
実行使用メモリ 39,076 KB
最終ジャッジ日時 2025-03-20 11:10:48
合計ジャッジ時間 2,863 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
	N, T = map(int, input().split())
	t = list(map(int, input().split()))
	s = [0] * N
	for i in range(N - 1):
		s[i + 1] = s[i] + t[i]
	K = int(input())
	x = list(map(int, input().split()))
	for i in range(K):
		if T + i * 10 <= s[x[i] - 1]:
			print(-1)
			return 0
	print(max((s[N - 1] - T) // 10, -1) + 1)
	return 0
a = solve()
0