Mahmoud has n line segments, the i-th of them has length a[i]. Ehab challenged him to use exactly 3 line segments to form a triangle. Mahmoud doesn't accept challenges unless he is sure he can win, so he asked you to tell him if he should accept the challenge. Given the lengths of the line segments, check if he can choose exactly 3 of them to form a triangle.
Mahmoud should use exactly 3 line segments, he can't concatenate two line segments or change any length.
小马有 n 条线段,第 i 条线段的长度为 a[i]。小艾向他提出挑战,要求他用刚好 3 条线段组成一个三角形。小马不接受挑战除非他确定自己能赢,所以他让你告诉他是否应该接受挑战。给定线段的长度,检查他是否能从中选出恰好 3 个线段组成三角形。
小马应该正好使用 3 个线段,他不能连接两个线段或改变任何长度。