結果

問題 No.1882 Areas of Triangle
ユーザー lllllll88938494
提出日時 2022-06-22 00:03:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 150 ms
コンパイル使用メモリ 82,512 KB
実行使用メモリ 90,948 KB
最終ジャッジ日時 2024-10-15 01:55:16
合計ジャッジ時間 3,842 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4 WA * 1
other AC * 12 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_left as bl , bisect_right as br

n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
ans=0

def  c(x,y):
    return x*y / 2 >= k

def  nb(x):
    ng = 1 
    ok = 10**10
    while ok - ng > 1:
        mid=(ok + ng) / 2
        if c(x,mid):
            ok = mid
        else:
            ng = mid
    return ok
for i in range(n):
    t=nb(a[i])
    ans+= n - bl(a,t)
    
print(ans)
0