結果
問題 |
No.3128 Isosceles Triangle
|
ユーザー |
|
提出日時 | 2025-07-14 15:55:18 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 398 ms / 2,500 ms |
コード長 | 253 bytes |
コンパイル時間 | 273 ms |
コンパイル使用メモリ | 82,288 KB |
実行使用メモリ | 181,792 KB |
最終ジャッジ日時 | 2025-07-14 15:55:27 |
合計ジャッジ時間 | 8,645 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
ソースコード
from collections import Counter from bisect import bisect_left N = int(input()) A = list(map(int, input().split())) A.sort() cnt = Counter(A) ans = 0 for a, v in sorted(cnt.items()): ans += v * (v - 1) // 2 * (bisect_left(A, 2 * a) - v) print(ans)