結果
問題 |
No.871 かえるのうた
|
ユーザー |
![]() |
提出日時 | 2019-08-31 21:50:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 438 bytes |
コンパイル時間 | 163 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 27,348 KB |
最終ジャッジ日時 | 2024-11-25 08:53:27 |
合計ジャッジ時間 | 5,299 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 WA * 39 |
ソースコード
N,K=map(int,input().split()) P=list(map(int,input().split())) INF=float('inf') P=[-INF]+P+[INF] A=list(map(int,input().split())) A=[0]+A+[0] L=-A[K] R=A[K] for i in range(10**5+5): if L<=P[K-i]: if L>P[K-i]-A[K-i]: L=P[K-i]-A[K-i] else: break #print(i) for j in range(10**5+5): if R>=P[K+j]: if R<P[K+j]+A[K+j]: R=P[K+j]+A[K+j] else: break #print(j) print(i+j-1)