結果

問題 No.1882 Areas of Triangle
ユーザー lloyz
提出日時 2022-03-25 00:47:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 117 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 82,836 KB
実行使用メモリ 90,968 KB
最終ジャッジ日時 2024-10-13 08:15:26
合計ジャッジ時間 2,761 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left

n, k = map(int, input().split())
k *= 2
A = list(map(int, input().split()))
A.sort()

ans = 0
for i in range(n):
    res = (k + A[i] - 1) // A[i]
    idx = bisect_left(A, res)
    ans += n - idx
print(ans)
0