結果
問題 |
No.3067 +10 Seconds Clock
|
ユーザー |
![]() |
提出日時 | 2025-03-22 01:54:51 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 377 bytes |
コンパイル時間 | 463 ms |
コンパイル使用メモリ | 82,308 KB |
実行使用メモリ | 113,408 KB |
最終ジャッジ日時 | 2025-03-22 01:54:56 |
合計ジャッジ時間 | 4,219 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 3 RE * 1 |
ソースコード
n,T=map(int,input().split()) t=list(map(int,input().split())) K=int(input()) x=list(map(int,input().split())) p=[0]*n for v in x: p[v-1]=1 ok=K+1 ng=-1 while ok-ng>1: m=(ok+ng)//2 now=T k=m for i in range(n-1): now-=t[i] if now<=0: break if k>0 and x[i+1]: now+=10 k-=1 if now>0: ok=m else: ng=m print(ok if 0<=ok<=K else -1)