結果
問題 | No.1882 Areas of Triangle |
ユーザー |
|
提出日時 | 2022-10-13 14:47:28 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 210 ms / 2,000 ms |
コード長 | 376 bytes |
コンパイル時間 | 221 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 21,820 KB |
最終ジャッジ日時 | 2024-06-26 12:02:11 |
合計ジャッジ時間 | 3,100 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 24 |
ソースコード
import bisect def main(): N, K = map(int, input().split()) A = list(map(int, input().split())) A.sort() length = len(A) patterns = 0 for bottom in A: height = 2 * K / bottom height_lower_index = bisect.bisect_left(A, height) patterns += length - height_lower_index print(patterns) if __name__ == "__main__": main()