結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
わん
|
| 提出日時 | 2025-03-31 00:15:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 357 bytes |
| コンパイル時間 | 371 ms |
| コンパイル使用メモリ | 82,332 KB |
| 実行使用メモリ | 113,512 KB |
| 最終ジャッジ日時 | 2025-03-31 00:15:47 |
| 合計ジャッジ時間 | 4,711 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 WA * 1 |
ソースコード
N, T = map(int, input().split())
t = list(map(int, input().split()))
K = int(input())
x = list(map(int, input().split()))
items = 0
ans = 0
j = 0
for i in range(N-1):
T -= t[i]
while T <= 0 and items:
T += 10
items -= 1
ans += 1
if T <= 0:
ans = -1
break
if j < K and x[j] == i+1:
j += 1
items += 1
print(ans)
わん