結果

問題 No.3067 +10 Seconds Clock
ユーザー Nichi10p
提出日時 2025-03-21 21:43:11
言語 Python3
(3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 101 ms / 2,000 ms
+ 715µs
コード長 380 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 57 ms
コンパイル使用メモリ 14,720 KB
実行使用メモリ 31,168 KB
最終ジャッジ日時 2026-11-11 04:38:12
合計ジャッジ時間 3,461 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def main():
  n, t, = map(int, input().split())
  T = list(map(int, input().split()))
  input()
  X = list(map(int, input().split()))

  X.append(10**18)
  X.reverse()
  cnt = 0
  for i, ti in enumerate(T, 2):
    t -= ti
    if t <= 0:
      print(-1)
      return
    if i == X[-1]:
      cnt += 1
      t += 10
      X.pop()

  cnt -= min((t-1) // 10, cnt)
  print(cnt)

main()
0