結果
| 問題 | 
                            No.1882 Areas of Triangle
                             | 
                    
| ユーザー | 
                             vwxyz
                         | 
                    
| 提出日時 | 2022-09-06 15:40:17 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 168 ms / 2,000 ms | 
| コード長 | 264 bytes | 
| コンパイル時間 | 82 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 21,688 KB | 
| 最終ジャッジ日時 | 2024-11-21 16:51:26 | 
| 合計ジャッジ時間 | 2,768 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 24 | 
ソースコード
from collections import defaultdict
import sys
readline=sys.stdin.readline
write=sys.stdout.write
import bisect
N,K=map(int,readline().split())
A=list(map(int,readline().split()))
ans=0
A.sort()
for a in A:
    ans+=N-bisect.bisect_left(A,(2*K+a-1)//a)
print(ans)
            
            
            
        
            
vwxyz