結果

問題 No.871 かえるのうた
ユーザー kawausoHSkawausoHS
提出日時 2019-08-30 23:00:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 306 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 28,464 KB
最終ジャッジ日時 2024-05-01 20:02:34
合計ジャッジ時間 4,393 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,752 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 WA -
testcase_04 RE -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 WA -
testcase_09 WA -
testcase_10 RE -
testcase_11 RE -
testcase_12 WA -
testcase_13 RE -
testcase_14 WA -
testcase_15 RE -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 RE -
testcase_20 WA -
testcase_21 RE -
testcase_22 RE -
testcase_23 WA -
testcase_24 WA -
testcase_25 RE -
testcase_26 RE -
testcase_27 WA -
testcase_28 RE -
testcase_29 WA -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 WA -
testcase_34 WA -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 WA -
testcase_39 WA -
testcase_40 RE -
testcase_41 AC 29 ms
10,752 KB
testcase_42 AC 80 ms
17,904 KB
testcase_43 RE -
testcase_44 WA -
testcase_45 WA -
testcase_46 AC 30 ms
10,752 KB
testcase_47 AC 29 ms
10,752 KB
testcase_48 AC 29 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a = 1
x,y = map(int, input().split())
lisX = list(map(int, input().split()))
lisA = list(map(int, input().split()))

t = lisX[y-1] + lisA[y-1]
s = lisX[y-1] - lisA[y-1]

for i in range(x//2):
        
    if lisX[y-2-i] >= s:
        a += 1
        
    if lisX[y+i] <= t:
        a += 1
        
print(a)
0