結果

問題 No.1965 Heavier
ユーザー 👑 KazunKazun
提出日時 2022-06-03 22:37:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 208 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 81,640 KB
実行使用メモリ 130,848 KB
最終ジャッジ日時 2023-10-21 02:08:58
合計ジャッジ時間 4,599 ms
ジャッジサーバーID
(参考情報)
judge11 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,336 KB
testcase_01 AC 39 ms
53,336 KB
testcase_02 AC 39 ms
53,336 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 38 ms
53,336 KB
testcase_06 AC 140 ms
130,064 KB
testcase_07 AC 145 ms
130,088 KB
testcase_08 AC 126 ms
109,136 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 132 ms
129,184 KB
testcase_26 AC 130 ms
128,600 KB
testcase_27 AC 134 ms
130,848 KB
testcase_28 AC 134 ms
130,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

X=0
r=0
for l in range(N):
    r=max(r,l+1)

    while r<N and A[r]-A[l]>abs(B[r]-B[l]):
        r+=1

    X+=r-l-1

print(X)
0