結果

問題 No.1882 Areas of Triangle
ユーザー _matumo_
提出日時 2022-04-25 09:57:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 586 ms / 2,000 ms
コード長 177 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 21,932 KB
最終ジャッジ日時 2024-06-27 05:28:15
合計ジャッジ時間 3,362 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=sorted(map(int,input().split()))
K2=K*2
sm=0
H=N
for a in A:
	L=-1
	while H-L>1:
		M=(H+L)//2
		if A[M]*a<K2:	L=M
		else:			H=M
	sm+=N-H
print(sm)
0