結果
| 問題 |
No.3067 +10 Seconds Clock
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 23:25:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 131 ms / 2,000 ms |
| コード長 | 451 bytes |
| コンパイル時間 | 325 ms |
| コンパイル使用メモリ | 82,536 KB |
| 実行使用メモリ | 113,280 KB |
| 最終ジャッジ日時 | 2025-03-21 23:25:08 |
| 合計ジャッジ時間 | 3,327 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
N, T = map(int, input().split())
t = list(map(int, input().split()))
K = int(input())
x = list(map(int, input().split()))
x = [a-1 for a in x]
x.reverse()
cnt = 0
now = T
for i in range(N-1):
while now - t[i] <= 0:
if len(x) == 0:
print(-1)
exit()
xx = x.pop()
if xx <= i:
cnt += 1
now += 10
else:
print(-1)
exit()
now -= t[i]
print(cnt)