結果

問題 No.1882 Areas of Triangle
ユーザー lam6er
提出日時 2025-03-20 18:40:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 82,168 KB
実行使用メモリ 92,276 KB
最終ジャッジ日時 2025-03-20 18:40:13
合計ジャッジ時間 2,509 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n, k = map(int, input().split())
A = list(map(int, input().split()))
B = sorted(A)
target = 2 * k
count = 0

for a in A:
    if a == 0:
        m = 0
    else:
        m = (target + a - 1) // a
    idx = bisect.bisect_left(B, m)
    count += len(B) - idx

print(count)
0