結果

問題 No.871 かえるのうた
ユーザー shoooooshooooo
提出日時 2019-11-28 01:31:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 28,416 KB
最終ジャッジ日時 2024-04-27 17:26:24
合計ジャッジ時間 4,438 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,752 KB
testcase_01 WA -
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 26 ms
10,880 KB
testcase_04 AC 26 ms
10,880 KB
testcase_05 AC 25 ms
10,880 KB
testcase_06 WA -
testcase_07 AC 26 ms
10,752 KB
testcase_08 AC 27 ms
11,136 KB
testcase_09 AC 27 ms
11,264 KB
testcase_10 AC 25 ms
10,880 KB
testcase_11 AC 25 ms
10,880 KB
testcase_12 AC 37 ms
13,440 KB
testcase_13 AC 28 ms
11,392 KB
testcase_14 AC 90 ms
26,628 KB
testcase_15 AC 91 ms
28,196 KB
testcase_16 AC 182 ms
25,896 KB
testcase_17 AC 89 ms
26,476 KB
testcase_18 AC 35 ms
13,188 KB
testcase_19 WA -
testcase_20 AC 39 ms
12,044 KB
testcase_21 AC 61 ms
16,240 KB
testcase_22 AC 24 ms
10,752 KB
testcase_23 AC 25 ms
10,880 KB
testcase_24 AC 25 ms
10,880 KB
testcase_25 AC 27 ms
11,008 KB
testcase_26 AC 39 ms
12,032 KB
testcase_27 AC 33 ms
13,056 KB
testcase_28 AC 24 ms
10,752 KB
testcase_29 AC 54 ms
17,824 KB
testcase_30 AC 132 ms
22,856 KB
testcase_31 AC 27 ms
11,136 KB
testcase_32 AC 108 ms
21,152 KB
testcase_33 WA -
testcase_34 AC 40 ms
14,956 KB
testcase_35 AC 60 ms
19,444 KB
testcase_36 AC 73 ms
22,316 KB
testcase_37 AC 88 ms
17,528 KB
testcase_38 AC 163 ms
26,988 KB
testcase_39 WA -
testcase_40 AC 113 ms
17,908 KB
testcase_41 AC 26 ms
10,880 KB
testcase_42 AC 114 ms
17,932 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 AC 26 ms
10,752 KB
testcase_47 AC 25 ms
10,752 KB
testcase_48 AC 28 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0