Problem: Determine if an N-sided polygon (not necessarily convex) with sides of length L_1, L_2, ..., L_N can be drawn in a two-dimensional plane.  You can use the following theorem:  **Theorem** : an N-sided polygon satisfying the condition can be drawn if and only if the longest side is strictly shorter than the sum of the lengths of the other N-1 sides.

Submission attempts (in order):
# -*- coding: utf-8 -*-

index = int(input('input num : '))


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum <= tmp - maximum:
    print("Yes")
else:
    print("No")



# -*- coding: utf-8 -*-

index = int(input('input num : '))


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum < other - maximum:
    print("Yes")
else:
    print("No")

# -*- coding: utf-8 -*-

index = int(input())
 

max = 0
other = 0
l =　input().split()
for i in range(n):
 tmp = l[i]
 max = tmp if tmp > max else other = other +  l[i]
 
if max < tmp:
 print("Yes")
else: 
 print("No")

# -*- coding: utf-8 -*-

index = int(input())


max = 0
other = 0
for i in range(n):
  tmp = input()
  max = tmp if tmp > max else other = other +  tmp

print("Yes") if max < tmp else print("No")



# -*- coding: utf-8 -*-

index = int(input('input num : '))


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum >= tmp - maximum :
    print("Yes")
else:
    print("No")

# -*- coding: utf-8 -*-

index = int(input('input num : '))


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum < other - maximum:
    print("Yes")
else:
    print("No")


# -*- coding: utf-8 -*-

index = int(input())
 

max = 0
other = 0
l = input().split() 
for i in range(index):
 tmp = int(l[i])
 if tmp > max :
    max = tmp 
 else:
    other = other +  tmp
 
if max < tmp:
 print("Yes")
else: 
 print("No")

# -*- coding: utf-8 -*-

index = int(input())
 

max = 0
other = 0
l = input().split() 
for i in range(index):
 tmp = int(l[i])
 if tmp > max :
    max = tmp 
 else:
    other = other +  tmp
 
if max <= tmp:
 print("Yes")
else: 
 print("No")

# -*- coding: utf-8 -*-

index = int(input())


max = 0
other = 0
for i in range(n):
  tmp = input()
  max = tmp if tmp > max else other = other +  tmp

 if max < tmp  :
   print("Yes")
else : 
print("No")



# -*- coding: utf-8 -*-

index = int(input())
 

max = 0
other = 0
l = input().split() 
for i in range(index):
 tmp = int(l[i])
 if tmp > max :
    max = tmp 
 else:
    other = other +  tmp
 
if max < tmp:
 print("Yes")
else: 
 print("No")

# -*- coding: utf-8 -*-

index = int(input())


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum < other - maximum:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted