結果

問題 No.1882 Areas of Triangle
ユーザー lllllll88938494lllllll88938494
提出日時 2022-06-22 00:03:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 82,416 KB
実行使用メモリ 91,708 KB
最終ジャッジ日時 2024-04-23 02:32:52
合計ジャッジ時間 4,074 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,696 KB
testcase_01 AC 38 ms
52,912 KB
testcase_02 AC 38 ms
52,816 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 396 ms
91,368 KB
testcase_07 AC 39 ms
52,068 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 38 ms
53,496 KB
testcase_11 AC 40 ms
52,284 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 39 ms
52,668 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 100 ms
76,088 KB
testcase_21 AC 74 ms
76,596 KB
testcase_22 AC 118 ms
76,588 KB
testcase_23 AC 186 ms
79,012 KB
testcase_24 AC 173 ms
79,024 KB
testcase_25 WA -
testcase_26 AC 38 ms
53,084 KB
testcase_27 AC 38 ms
52,816 KB
testcase_28 AC 38 ms
53,612 KB
権限があれば一括ダウンロードができます

ソースコード

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