結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,880 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 25 ms
10,752 KB
testcase_42 AC 91 ms
17,776 KB
testcase_43 RE -
testcase_44 WA -
testcase_45 WA -
testcase_46 AC 27 ms
10,624 KB
testcase_47 AC 26 ms
10,624 KB
testcase_48 AC 26 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()))



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