結果

問題 No.1882 Areas of Triangle
ユーザー wgrapewgrape
提出日時 2023-10-31 16:32:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 137 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 81,844 KB
実行使用メモリ 91,852 KB
最終ジャッジ日時 2023-10-31 16:32:07
合計ジャッジ時間 5,897 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,532 KB
testcase_01 AC 36 ms
53,532 KB
testcase_02 AC 36 ms
53,532 KB
testcase_03 AC 36 ms
53,532 KB
testcase_04 AC 137 ms
89,964 KB
testcase_05 AC 117 ms
91,852 KB
testcase_06 AC 101 ms
91,652 KB
testcase_07 AC 36 ms
53,532 KB
testcase_08 AC 36 ms
53,532 KB
testcase_09 AC 37 ms
53,532 KB
testcase_10 AC 36 ms
53,532 KB
testcase_11 AC 36 ms
53,532 KB
testcase_12 AC 36 ms
53,532 KB
testcase_13 AC 36 ms
53,532 KB
testcase_14 AC 36 ms
53,532 KB
testcase_15 AC 35 ms
53,532 KB
testcase_16 AC 42 ms
59,288 KB
testcase_17 AC 48 ms
64,600 KB
testcase_18 AC 48 ms
64,600 KB
testcase_19 AC 52 ms
72,788 KB
testcase_20 AC 53 ms
72,792 KB
testcase_21 AC 51 ms
70,740 KB
testcase_22 AC 62 ms
75,868 KB
testcase_23 AC 78 ms
78,892 KB
testcase_24 AC 71 ms
78,856 KB
testcase_25 AC 37 ms
53,532 KB
testcase_26 AC 36 ms
53,532 KB
testcase_27 AC 36 ms
53,532 KB
testcase_28 AC 36 ms
53,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
A = sorted(list(map(int,input().split())))

import bisect
ans = 0
for i in range(N):
    ind = bisect.bisect_left(A, K * 2 / A[i])
    ans += N - ind
    
print(ans)
0