結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
👑 SPD_9X2
|
| 提出日時 | 2025-03-22 17:43:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 450 bytes |
| コンパイル時間 | 686 ms |
| コンパイル使用メモリ | 82,184 KB |
| 実行使用メモリ | 123,940 KB |
| 最終ジャッジ日時 | 2025-03-22 17:43:31 |
| 合計ジャッジ時間 | 3,915 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 5 |
ソースコード
"""
"""
import sys
N,T = map(int,input().split())
t = list(map(int,input().split()))
K = int(input())
x = set(map(int,input().split()))
now = T
keep = 0
ans = 0
for i in range(N-1):
T -= t[i]
if T <= 0:
cnt = min(keep , 1-T//10)
ans += cnt
T += cnt * 10
keep -= cnt
if keep < 0 or T <= 0:
print ("-1")
sys.exit()
if i+2 in x:
keep += 1
print (ans)
SPD_9X2