結果
問題 | No.3067 +10 Seconds Clock |
ユーザー |
|
提出日時 | 2025-03-22 20:44:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 154 ms / 2,000 ms |
コード長 | 261 bytes |
コンパイル時間 | 460 ms |
コンパイル使用メモリ | 82,168 KB |
実行使用メモリ | 136,000 KB |
最終ジャッジ日時 | 2025-03-22 20:44:49 |
合計ジャッジ時間 | 4,082 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
(n,t),ts,(k,),x=[[*map(int,s.split())]for s in open(0)] x={i-1 for i in x} sk=ans=0 for i in range(n-1): t-=ts[i] if t+sk*10<=0: exit(print(-1)) while t<=0: sk-=1 t+=10 ans+=1 # print(i,ts[i],sk,t,ans) if i+1 in x: sk+=1 print(ans)