Polygon Possibility(hackerearth.2)
You are given length of n sides, you need to answer whether it is possible to make n sided convex polygon with it.
Input : -
First line contains ,no .of testcases.
For each test case , first line consist of single integer ,second line consist of spaced integers, size of each side.
Output : -
For each test case print "Yes" if it is possible to make polygon or else "No" if it is not possible.
No
t=int(input())
for i in range(t):
n=int(input())
lst=list(map(int,input().split()))
sum_of_all_side=sum(lst)
largset_side_length=max(lst)
if(sum_of_all_side-largset_side_length>largset_side_length):
print("Yes")
else:
print("No")
Comments
Post a Comment