結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:32:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 346 bytes |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 82,088 KB |
| 実行使用メモリ | 113,524 KB |
| 最終ジャッジ日時 | 2025-03-21 21:32:14 |
| 合計ジャッジ時間 | 3,073 ms |
|
ジャッジサーバーID (参考情報) |
judge7 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 5 RE * 9 |
ソースコード
n, t = map(int, input().split())
a = list(map(int, input().split()))
k = int(input())
x = list(map(int, input().split()))
x.reverse()
cnt = 0
for i in range(n-1):
t -= a[i]
if t <= 0 and cnt == 0:
exit(print(-1))
elif t <= 0:
t += 10
cnt -= 1
if x[-1] == i+1:
cnt += 1
x.pop()
print(k-cnt)