結果

問題 No.1882 Areas of Triangle
ユーザー AEn
提出日時 2022-05-11 23:20:15
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 108 ms / 2,000 ms
+ 634µs
コード長 274 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 257 ms
コンパイル使用メモリ 96,108 KB
実行使用メモリ 99,584 KB
最終ジャッジ日時 2026-08-18 09:54:58
合計ジャッジ時間 4,113 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import bisect
N, K = map(int, input().split())
A = list(map(int,input().split()))
A.sort()
cnt = 0
for i in range(N):
    if (2*K)%A[i] == 0:
        cnt += (N-bisect.bisect_right(A, 2*K//A[i] - 1))
    else:
        cnt += (N-bisect.bisect_right(A, 2*K//A[i]))

print(cnt)
0