結果
| 問題 | No.3128 Isosceles Triangle |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-14 15:55:18 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 279 ms / 2,500 ms |
| + 64µs | |
| コード長 | 253 bytes |
| 記録 | |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 95,588 KB |
| 実行使用メモリ | 189,156 KB |
| 最終ジャッジ日時 | 2026-07-13 05:59:58 |
| 合計ジャッジ時間 | 8,246 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)