> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0976_largest_perimeter_triangle/slt.md).

# 思路1

不失一般性，我们假设三角形的边长满足 a≤b≤c，那么这三条边组成面积不为零的三角形的充分必要条件为 a+b>c。

把A按增序排序，然后从后往前找相邻的三个元素满足abc的条件即可。

时间复杂度O(nlogn)
