結果
| 問題 |
No.871 かえるのうた
|
| コンテスト | |
| ユーザー |
shooooo
|
| 提出日時 | 2019-11-28 01:31:51 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 320 bytes |
| コンパイル時間 | 414 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 28,096 KB |
| 最終ジャッジ日時 | 2024-11-15 21:30:26 |
| 合計ジャッジ時間 | 6,148 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 WA * 8 |
ソースコード
N,K=map(int,input().split()) r=list(map(int,input().split())) A=list(map(int,input().split())) K-=1 left=r[K]-A[K] right=r[K]+A[K] ans=0 K1=K while K1-1>=0 and left<=r[K1-1]: left=min(r[K1-1]-A[K1-1],left) K1-=1 ans+=1 while K+1<=N-1 and r[K+1]<=right: right=max(r[K+1]+A[K+1],right) K+=1 ans+=1 print(ans+1)
shooooo