結果

問題 No.1882 Areas of Triangle
ユーザー lam6er
提出日時 2025-03-20 20:16:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 92,332 KB
最終ジャッジ日時 2025-03-20 20:17:06
合計ジャッジ時間 3,060 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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