結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,560 KB
testcase_01 AC 38 ms
52,332 KB
testcase_02 AC 39 ms
52,280 KB
testcase_03 WA -
testcase_04 AC 828 ms
89,460 KB
testcase_05 AC 559 ms
91,504 KB
testcase_06 AC 794 ms
90,800 KB
testcase_07 AC 38 ms
52,900 KB
testcase_08 AC 39 ms
52,708 KB
testcase_09 AC 39 ms
53,008 KB
testcase_10 AC 38 ms
52,872 KB
testcase_11 AC 39 ms
52,260 KB
testcase_12 AC 38 ms
53,936 KB
testcase_13 WA -
testcase_14 AC 39 ms
52,468 KB
testcase_15 AC 39 ms
52,824 KB
testcase_16 AC 52 ms
64,620 KB
testcase_17 AC 63 ms
68,808 KB
testcase_18 AC 58 ms
69,708 KB
testcase_19 AC 112 ms
76,376 KB
testcase_20 AC 109 ms
75,980 KB
testcase_21 AC 86 ms
75,932 KB
testcase_22 AC 149 ms
76,300 KB
testcase_23 AC 326 ms
78,916 KB
testcase_24 AC 211 ms
79,236 KB
testcase_25 AC 38 ms
52,264 KB
testcase_26 AC 39 ms
53,420 KB
testcase_27 AC 38 ms
53,712 KB
testcase_28 AC 39 ms
52,856 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