結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:31:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 141 ms / 2,000 ms |
| コード長 | 529 bytes |
| コンパイル時間 | 193 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 121,580 KB |
| 最終ジャッジ日時 | 2025-03-21 21:31:56 |
| 合計ジャッジ時間 | 3,251 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
def solve():
N, T = map(int, input().split())
t = list(map(int, input().split()))
K = int(input())
x = list(map(int, input().split()))
tmp = [0]
p = [0] * N
for i in x:
p[i - 1] += 1
for i in range(1, N):
p[i] += p[i - 1]
for i in range(N - 1):
T -= t[i]
while T <= 0:
tmp[-1] += 1
T += 10
tmp.append(tmp[-1])
for i in range(N):
if p[i] < tmp[i]:
print(-1)
return
print(tmp[-1])
solve()