結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2025-03-21 21:33:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 143 ms / 2,000 ms |
| コード長 | 333 bytes |
| コンパイル時間 | 414 ms |
| コンパイル使用メモリ | 82,572 KB |
| 実行使用メモリ | 123,956 KB |
| 最終ジャッジ日時 | 2025-03-21 21:33:47 |
| 合計ジャッジ時間 | 3,245 ms |
|
ジャッジサーバーID (参考情報) |
judge7 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
N, T = map(int, input().split())
t = list(map(int, input().split()))
K = int(input())
X = set(map(int, input().split()))
cnt = 0
for i in range(N-1):
if i+1 in X:
cnt += 1
while cnt and T <= t[i]:
cnt -= 1
T += 10
if T <= t[i]:
print(-1)
break
T -= t[i]
else:
print(K-cnt)
detteiuu