結果

問題 No.871 かえるのうた
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-05-17 23:19:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 374 bytes
コンパイル時間 1,115 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 96,012 KB
最終ジャッジ日時 2023-10-14 02:21:45
合計ジャッジ時間 9,248 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,320 KB
testcase_01 WA -
testcase_02 AC 75 ms
71,248 KB
testcase_03 AC 73 ms
71,220 KB
testcase_04 AC 75 ms
71,384 KB
testcase_05 AC 74 ms
71,332 KB
testcase_06 WA -
testcase_07 AC 75 ms
71,332 KB
testcase_08 AC 78 ms
75,488 KB
testcase_09 AC 79 ms
75,620 KB
testcase_10 AC 77 ms
75,488 KB
testcase_11 AC 79 ms
75,544 KB
testcase_12 AC 83 ms
78,044 KB
testcase_13 AC 79 ms
75,544 KB
testcase_14 AC 131 ms
93,728 KB
testcase_15 AC 124 ms
93,684 KB
testcase_16 AC 135 ms
95,324 KB
testcase_17 AC 120 ms
93,512 KB
testcase_18 AC 82 ms
78,340 KB
testcase_19 WA -
testcase_20 AC 81 ms
76,536 KB
testcase_21 AC 102 ms
86,328 KB
testcase_22 AC 74 ms
71,404 KB
testcase_23 AC 73 ms
71,404 KB
testcase_24 AC 72 ms
71,324 KB
testcase_25 AC 80 ms
76,456 KB
testcase_26 AC 80 ms
76,116 KB
testcase_27 AC 80 ms
76,144 KB
testcase_28 AC 75 ms
71,116 KB
testcase_29 AC 99 ms
93,040 KB
testcase_30 AC 117 ms
96,012 KB
testcase_31 AC 77 ms
75,520 KB
testcase_32 AC 113 ms
95,708 KB
testcase_33 WA -
testcase_34 AC 84 ms
80,044 KB
testcase_35 AC 100 ms
92,760 KB
testcase_36 AC 109 ms
94,888 KB
testcase_37 AC 102 ms
87,972 KB
testcase_38 AC 125 ms
93,520 KB
testcase_39 WA -
testcase_40 AC 100 ms
93,276 KB
testcase_41 AC 73 ms
70,984 KB
testcase_42 AC 98 ms
93,368 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 AC 74 ms
71,008 KB
testcase_47 AC 74 ms
71,012 KB
testcase_48 AC 73 ms
71,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int,input().split())
X = list(map(int,input().split()))
A = list(map(int,input().split()))

k -= 1
r = k+1
rx = X[k]+A[k]
while r < n:
    if X[r] <= rx:
        rx = max(rx,X[r]+A[r])
        r += 1
    else:
        break

l = k-1
lx = X[k]-A[k]
while 0 <= l:
    if X[l] >= lx:
        lx = min(lx,X[l]-A[l])
        l -= 1
    else:
        break

print(r-l-1)
0