結果
| 問題 | No.3128 Isosceles Triangle |
| コンテスト | |
| ユーザー |
三価スニウム
|
| 提出日時 | 2025-04-27 11:58:23 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 175 ms / 2,500 ms |
| + 495µs | |
| コード長 | 251 bytes |
| 記録 | |
| コンパイル時間 | 80 ms |
| コンパイル使用メモリ | 63,956 KB |
| 実行使用メモリ | 112,116 KB |
| 最終ジャッジ日時 | 2026-11-12 03:02:04 |
| 合計ジャッジ時間 | 6,596 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 31 |
ソースコード
import bisect
import collections
N = int(input())
A = list(map(int, input().split(' ')))
A.sort()
ans = 0
for l, n in collections.Counter(A).items():
if n >= 2:
m = bisect.bisect(A, l*2-1) - n
ans += m * n * (n-1) // 2
print(ans)
三価スニウム