結果
| 問題 |
No.871 かえるのうた
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-04-19 18:42:04 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 372 bytes |
| コンパイル時間 | 387 ms |
| コンパイル使用メモリ | 82,036 KB |
| 実行使用メモリ | 99,080 KB |
| 最終ジャッジ日時 | 2025-01-02 09:33:46 |
| 合計ジャッジ時間 | 5,912 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 WA * 8 |
ソースコード
N,K = map(int,input().split())
X = list(map(int,input().split()))
A = list(map(int,input().split()))
migi = K
K -= 1
now = X[K] + A[K]
while migi < N and X[migi] <= now:
now = max(now,X[migi] + A[migi])
migi += 1
hidari = K
now = X[K] - A[K]
while hidari >= 0 and X[hidari] >= now:
now = min(now,X[hidari] - A[hidari])
hidari -= 1
print(migi - hidari - 1)