TnT/Multi_CodeNet4Repair huggingface dataset:
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):
n = int(input())
l =[int() for i in input().split()]
l.sort(reverse=True)
m = l.pop(0)
if m < sum(l):
  print('Yes')
else:
  print('No')

n= int(input())
list = [int(x) for x in input().split()]

if max(list) <  (sum(list) - max(list)):
  print('Yes')
else:
  print('No'

n = int(input())
l =[int() for i in input().split()]
print('Yes' if max(l) < sum(l) - max(l) else 'No')

n = int(input())
l =[int(i) for i in input().split()]
print('Yes' if max(l) < sum(l) - max(l) else 'No')

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
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):
n = int(input())
l = list(map(int,input().split()))
l.sort()
sum = 0
print(l[0])
for i in range(n-1):
    sum += l[i]
if (sum <= l[n-1]):
    print("No")
else:
    print("Yes")

n = int(input())
l = list(map(int,input().split()))
l.sort()
sum = 0
for i in range(n-1):
    sum += l[i]
if (sum <= l[n-1]):
    print("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Accepted
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):
n = int(input())
l = list(map(input().split(' '), int))
if max(l) < sum(l) - max(l):
  print('Yes')
else
  print('No')

n = int(input())
l = list(map(int, input().split(' ')))
if max(l) < sum(l) - max(l):
  print('Yes')
else
  print('No')


n = int(input())
l = list(map(int, input().split(' ')))
if max(l) < sum(l) - max(l):
  print('Yes')
else:
  print('No')


Verdicts: Runtime Error

Runtime Error

Accepted
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):
N = int(input())
L = list(map(int, input().split()))
if L[:-1] > L[-1]:
  print("Yes")
else:
  print("No")

N = int(input())
L = list(map(int, input().split()))
L.sort()
if sum(L[:-1]) < L[-1]:
  print("Yes")
else:
  print("No")

 = int(input())
L = list(map(int, input().split()))
L.sort()
if sum(L[:-1]) > L[-1]:
  print("Yes")
else:
  print("No")

     N= int(input())
    L = list(map(int, input().split()))
    L.sort()
    if sum(L[:-1]) > L[-1]:
      print("Yes")
    else:
      print("No")

N = int(input())
L = list(map(int, input().split()))
L.sort()
if sum(L[:-1]) > L[-1]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
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):
a=int(input())
b=list(map(int,input().split())
if sum(b)>2*max(b):
       print("Yes")
else:
       print("No")

a=int(input())
b=list(map(int,input().split()))
if sum(b)>2*max(b):
       print("Yes")
else:
       print("No")

Verdicts: Runtime Error

Accepted
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):
n=int(input())
l=list(map(int,input().split()))
L=max(l)
other=sum(l)-L
if other>=L:
  print('No')
else:
  print('Yes')

n=int(input())
l=list(map(int,input().split()))
L=max(l)
other=sum(l)-L
if other<=L:
  print('No')
else:
  print('Yes')


Verdicts: Wrong Answer

Accepted
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):
n,m=map(int,input().split())

listA=[]
for i in range(n):
    listA.append(list(map(int,input().split())))

for i in range(n):
    popped_item1=listA[i].pop(0)

listB=[]
for i in listA:
    for j in i:
        listB.append(j)

cnt=0
for i in range(m+1):
    if listB.count(i)==n:
        cnt+=1
print(cnt)

n=int(input())
listL = list(map(int, input().split()))
if max(listL)<(sum(listL)-max(listL)):
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
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):
N=int(input())
l_list=[int(input())for _ in range(N)]
max_l=max(l_list)
if sum(l_list)-max_l>max_l:
  print("Yes")
else:
  print("No")

N=int(input())
l_list = list(int(input()) for _ in range(N))
max_l=max(l_list)
if sum(l_list)-max_l>max_l:
  print("Yes")
else:
  print("No")

N = int(input())
l_list = list(map(int,input().split()))
max_l = max(l_list)
if sum(l_list)-max_l>max_l:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
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):
n = int(input())
l = list(map(int, input().split()))
tot = sum(l)
flag = True:
for l_i in l:
  if 2 * l_i >= tot:
    flag = False
    break
if flag:
  print('Yes')
else:
  print('No')

n = int(input())
l = list(map(int, input().split()))
tot = sum(l)
flag = True
for l_i in l:
  if 2 * l_i >= tot:
    flag = False
    break
if flag:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
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):
N=input()
a=sort(list(map(int, input().split())))
sum=0
for i in range(len(a)-1):
  sum+=a[i]
  
if sum>a(len(a)-1):
  Yes
else:
  No


N=int(input())
a=input().split()
for i in range(N):
  a[i]=int(a[i])
a.sort()
sum=0
m=len(a)-1
for i in range(m):
  sum+=a[i]
  
if sum>a[len(a)-1]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
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):
N = int(input())
L = list(map(int,input().split()))
if max(L) >= (sum(L) - max(L)):
  print('NO')
else:
  print('YES')

N = int(input())
L = list(map(int,input().split()))
if max(L) < (sum(L) - max(L)):
  print('YES')
else:
  print('NO')

N = int(input())
L = list(map(int,input().split()))
if max(L) >= sum(L) - max(L):
  print('No')
else:
  print('Yes')

Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
n = int(input())
l = sprted(list(map(int, input().split())))
if l[-1] * 2 < sum(l):
  print("Yes")
else:
  print("No")

n = int(input())
l = sorted(list(map(int, input().split())))
if l[-1] * 2 < sum(l):
  print("Yes")
else:
  print("No")


Verdicts: Runtime Error

Accepted
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):
n = int(input())
l = list(map(int,input().split()))
sortl = sorted(l)
ans = 0
for number in sortl:
         ans += number
if ans - sortl[n-1] >= sortl[n-1]:
         print("No")
else:
         print("Yes")


n = int(input())
l = list(map(int,input().split()))
sortl = sorted(l)
ans = 0
for number in sortl:
         ans += number
if ans - sortl(n-1) >= sortl(n-1):
         print("No")
else:
         print("Yes")


n = int(input())
l = list(map(int,input().split()))
sortl = sorted(l)
ans = 0
for number in sortl:
         ans += number
if ans - sortl[n-1] > sortl[n-1]:
         print("Yes")
else:
         print("No")


Verdicts: Wrong Answer

Runtime Error

Accepted
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):
N = int(input())
edges = map(int, input().split())

if max(edges) * 2 < sum(edges):
  print("Yes")
else:
  print("No")

N = int(input())
edges = list(map(int, input().split()))

if max(edges) * 2 < sum(edges):  
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
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):
N = int(input())
i_list = list(map(int,input().split()))
i_list = sorted(i_list)

line_sum = 0
for i in i_list[:-2]:
  line_sum += i

if i_list[-1] < line_sum:
  print("Yes")
else:
  print("No")





N = int(input())
i_list = list(map(int,input().split()))
i_list = sorted(i_list)

line_sum = 0
for i in i_list:
  line_sum += i

if max(i_list) < line_sum - max(i_list):
  print("Yes")
else:
  print("No")





Verdicts: Wrong Answer

Accepted
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):
N=int,input()
list=map(int,input().split())
list2=list
a=max(list)
b=sum(list2)
if a < b-a :
    print('Yes')
else :
    print('No')


N=int,input()
list=map(int,input().split())
a=max(list)
b=sum(list)
if a < b-a :
    print('Yes')
else :
    print('No')


N=int(input())
listL=list(map(int,input().split()))
a,b=max(listL),sum(listL)
if a < b-a :
    print('Yes')
else :
    print('No')

Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
N=int(input())
A=list(map(int,input().split()))
L=sorted(A,reverse=True)
if L[0]<sum(L[1,]):
  print("Yes")
else:
  print("No")

N=int(input())
A=list(map(int,input().split()))
L=sorted(A,reverse=True)
if L[0]<sum(L[1,]):
  print("Yes")
else:
  print("No")

N=int(input())
A=list(map(int,input().split()))
L=sorted(A,reverse=True)
if L[0]<sum(L[1:]):
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
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):
n = map(int,input.split())
l = [int(x) for x in input.split()]

s = sum(l)

for x in l:
  if (2*x>=s):
    print("No")
    exit(0)
print("Yes")
    

n = map(int,input.split())
l = [int(x) for x in input().split()]

s = sum(l)
res = "Yes"
for x in l:
  if (2*x>=s):
    res = "No"
print(res)
    

n = map(int,input().split())
l = [int(x) for x in input().split()]

s = sum(l)
res = "Yes"
for x in l:
  if (2*x>=s):
    res = "No"
print(res)
    

Verdicts: Runtime Error

Runtime Error

Accepted
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):
n,l=map(int,open(0).read().split())
sum_n=sum(l)
for i in range(n):
	if 2*l[i]>=sum_n
		print('No')
		import sys
		sys.exit()
print('Yes')

n,l=map(int,open(0).read().split())
sum_n=sum(l)
for i in range(n):
  if 2*l[i]>=sum_n
  	print('No')
    import sys
    sys.exit()
print('Yes')

n,*l=map(int,open(0).read().split())
sum_n=sum(l)
for i in range(n):
	if 2*l[i]>=sum_n:
		print('No')
		import sys
		sys.exit()
print('Yes')

Verdicts: Runtime Error

Runtime Error

Accepted
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):
N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
m.pop(m.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")

N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
m.pop(edges.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")


N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
edges.pop(edges.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")


Verdicts: Runtime Error

Runtime Error

Accepted
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):
l = input()
n = int(l)
l = input()
a = list(map(int, input().split(' ')))

if max(a) < sum(a)-max(a):
  print('Yes')
else:
  print('No')


l = input()
n = int(l)
l = input()
a = list(map(int, l.split(' ')))

if max(a) < sum(a)-max(a):
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
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):
_,l=map(int,open(0).read().split())
l.sort()
print("YNeos"[::sum(l[:-1])<=l[-1]])

_,l=map(int,open(0).read().split())
l.sort()
print("YNeos"[sum(l[:-1])<=l[-1]::2])

_,*l=map(int,open(0).read().split())
l.sort()
print("YNeos"[sum(l[:-1])<=l[-1]::2])

Verdicts: Runtime Error

Runtime Error

Accepted
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):
n = int(input())
d = list(map(int,input().split()))

dmax = max(d)

dsum = sum(d)

tan = dsum - dmax
print(dmax)
print(tan)
if tan > dmax:
  print("Yes")
else:
  print("No")

n = int(input())
d = list(map(int,input().split()))

dmax = max(d)

dsum = sum(d)

tan = sum(d) - max(d)

if tan < dmax:
  print("Yes")
else:
  print("No")

n = int(input())
d = list(map(int,input().split()))

dmax = max(d)

dsum = sum(d)

tan = dsum - dmax

if tan > dmax:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
N = int(input())
L = input().split()

L_i = [int(s) for s in L]

Length = 0
sum = 0
num = 0

for i in range(N):
    sum += L_i[i]
    
    if L_i[i] > Length:
        Length = L_i[i]
        num = i


if Length * 2 < sum:
    print("yes")
else:
    print("no")

N = int(input())
L = input().split()

L_i = [int(s) for s in L]

Length = 0
sum = 0
num = 0

for i in range(N):
    sum += L_i[i]
    
    if L_i[i] > Length:
        Length = L_i[i]
        num = i


if Length * 2 > sum:
    print("yes")
else:
    print("no")

N = int(input())
L = input().split()

L_i = [int(s) for s in L]

Length = 0
sum = 0
num = 0

for i in range(N):
    sum += L_i[i]

    if L_i[i] > Length:
        Length = L_i[i]
        num = i


if Length * 2 < sum:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
N=int(input())
input_list=map(int,input().split(" "))

max_input=max(input_list)
Sum_input=sum(input_list)-max_input
if max_input<Sum_input:
    print("Yes")
else:
    print("No")

N=int(input())
input_list=list(map(int,input().split(" ")))

max_input=max(input_list)
Sum_input=sum(input_list)-max_input
if max_input<Sum_input:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
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):
N = int(input())
L = sorted(list(map(int, input().split())))

max_length = L[-1]
sum_length = sum(L[0:len(L)-1])
print(sum_length)

print("Yes") if max_length > sum_length else print("No")

# ABC117

N = int(input())
L = sorted(list(map(int, input().split())))

max_length = L[-1]
sum_length = sum(L[0:len(L)-1])

print("Yes") if max_length > sum_length else print("No")


N = int(input())
L = sorted(list(map(int, input().split())))

max_length = L[-1]
sum_length = sum(L[0:len(L)-1])

print("Yes") if max_length < sum_length else print("No")


Verdicts: Wrong Answer

Wrong Answer

Accepted
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):
n = int(input())
nums = list(map(int, input().split()))
nums.sort()
max = nums.pop(-1)
if(sum(nums) > max):
    print("yes")
elif(sum(nums) <= max):
    print("no")


n = int(input())
nums = list(map(int, input().split()))
nums.sort()
max = nums.pop(-1)
print(sum(nums))

if(sum(nums) > max):
    print("yes")
else:
    print("no")


n = int(input())
nums = list(map(int, input().split()))
nums.sort()
max = nums.pop(-1)
print(sum(nums))

if(sum(nums) > max):
    print("yes")
elif(sum(nums) <= max):
    print("no")


n = int(input())
nums = list(map(int, input().split()))
nums.sort()
max = nums.pop(-1)
print(sum(nums))

if(sum(nums) > max):
    print("yes")
elif(sum(nums) <= max)
    print("no")


n = int(input())
lines = [int(x) for x in input().split()]
lines
lines = sorted(lines)
if lines[-1] < sum(lines[:-1]):
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted
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):
n=int(input())
l=list(map(int,input().split()))
m=l.pop(max(l))
print("Yes" if m>sum(l) else "No")

n=int(input())
l=sorted(list(map(int,input().split())))
m=l.pop(-1)
print("Yes" if m<sum(l) else "No")

Verdicts: Runtime Error

Accepted
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):
n = int(input())
l = [int.input() for i in range(n)]
s = sorted(l)
sum_of_s = sum(s)
if sum_of_s > 2 * s[-1]:
  print('Yes')
else:
  print('No')

n = int(input())
l = list(map(int, input().split()))
if sum(l) > 2 * max(l):
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
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):
input()
ls = list(map(int, input().split()))
lmax = max(ls)
lmaxi = ls.index(lmax)
lss = ls[:lmaxi] + ls[lmaxi+1:]

print("Yes" if sum(lss) < lmax else "No")

input()
ls = list(map(int, input().split()))
lmax = max(ls)
lmaxi = ls.index(lmax)
lss = ls[:lmaxi] + ls[lmaxi+1:]
print("Yes" if lmax < sum(lss) else "No")


Verdicts: Wrong Answer

Accepted
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):
num = input()
numlist = map(int, input().split())
numlistmax = max(numlist)
totalnum = sum(numlist)
if totalnum - numlistmax > numlistmax:
  print("Yes")
else:
  print("No")

num = input()
numlist = map(int, input().split())
numlist = list(numlist)
numlistmax = max(numlist)
totalnum = sum(numlist)
if totalnum - numlistmax > numlistmax:
  print("Yes")
else:
  print("No")



Verdicts: Wrong Answer

Accepted
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):
c=list(map(int, input().split(" ")))

from statistics import mean, median,variance,stdev

if sum(list1)-max(list1)< max(list1):
    print("Yes")
else:
    print("No")

a=input()
c=list(map(int, input().split(" ")))
 
from statistics import mean, median,variance,stdev
 
if sum(list1)-max(list1)< max(list1):
    print("Yes")
else:
    print("No")

a=input()
c=list(map(int, input().split()))
 
#from statistics import mean, median,variance,stdev
 
if sum(c)-max(c) > max(c):
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
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):
N = int(input())
L = list((int,input().split()))

if max(L) - (sum(L) - max(L)) < 0:
    print('Yes')
else:
    print('No')

N = int(input())
L = list((int,input().split()))

if max(L) - (sum(L) - max(L)) < 0:
    print('Yes')
else:
    print('No')

N = int(input())
L = list(map(int,input().split()))

if max(L) < (sum(L) - max(L)):
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Accepted
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):
s = [input() for i in range(2)]
N = int(s[0])
L = map(int, s[1].split())
print(if('Yes', max(L) < sum(L) - max(L), 'No'))

s = [input() for i in range(2)]
N = int(s[0])
L = list(map(int, s[1].split()))
print('Yes' if max(L) < sum(L) - max(L) else 'No')

Verdicts: Runtime Error

Accepted
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):
n=int(input())
l=list(map(int,input().split()))
s=max(l)
l.sort()
l.remove(s)
if sum(s[0:len(s)+1]) > s:
 print("Yes")
else:
 print("No")

n=int(input())
l=list(map(int,input(),split()))
s=max(l)
l.sort()
l.remove(s)
if sum(s[0:len(s)+1]) > s:
 print("Yes")
else:
 print("No")

n=int(input())
l=list(map(int,input().split()))
s=max(l)
l.sort()
l.remove(s)
if sum(l[0:len(l)+1]) > s:
 print("Yes")
else:
 print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
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):
N = int(input())
L = sorted(list(map(int, input().split())))

if sum(L[:-1]) > L[:-1] :
	print('Yes')
else:
	print('No')

print(L)

N = int(input())
L = sorted(list(map(int, input().split())))

if sum(L[:-1]) > L[-1] :
	print('Yes')
else:
	print('No')


Verdicts: Runtime Error

Accepted
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):
N,M = map(int,input().split())
X = list(map(int,input().split()))
X.sort()
A = []
for i in range(M-1):
    A.append(X[i+1]-X[i])
A.sort()
print(sum(A[:M-N]))

N = int(input())
L = list(map(int,input().split()))
if max(L) < sum(L)-max(L):
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Accepted
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):
n=int(input())
l=list(map(int,input().split()))
sum=0

for i in range(n-1):
  sum+=l[i]

if(sum>=l[n-1]):
  print("No")
else:
  print("Yes")

n=int(input())
l=[input() for i in range(n)]
l.sort()
sum=0

for i in range(n-1):
  sum+=l[i]

if(sum>=l[n-1]):
  print("No")
else:
  print("Yes")

n=int(input())
l=list(map(int,input().split()))
sum=0
l.sort()
for i in range(n-1):
  sum+=l[i]

if(sum<=l[n-1]):
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Runtime Error

Accepted
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):
import random
n = int(input())

x = [random.randint(1,100) for i in range(n)]

for i in range(n):
    if x[i] < n:
        x[i] += i
        print("Yes")
        break
else:
    print("No")
    

n = int(input())
l = list(map(int,input().split()))
if max(l) < sum(l)-max(l):
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
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):
n = int(input())
t = list(map(int,input().split()))
a = max(t)
if a < sum(t.remove(a)):
  print("Yes")
else:
  print("No")


n = int(input())
t = list(map(int,input().split()))
a = max(t)
if a < (sum(t) - a):
  print("Yes")
else:
  print("No")


Verdicts: Runtime Error

Accepted
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):
n = int(input())
m = str(input())
l = m.split()
if max(l) >= sum(l) - max(l):
    print("No")
else:
    print("Yes")

n = int(input())
l = list(map(int,input().split()))
if max(l) < sum(l) - max(l):
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
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):
a = int(input())
b = list(map(int, input().split()))
b.sort()
c = 0
for i in range(0, a-1):
    c += b[i]
if b[-1] < c:
    print("YES")
else:
    print("NO")


a = int(input())
b = list(map(int, input().split()))
b.sort()
c = 0
for i in range(0, a-1):
    c += b[i]
if b[a-1] < c:
    print("YES")
else:
    print("NO")


a = int(input())
b = list(map(int, input().split()))
b.sort()
c = 0
for i in range(0, a-1):
    c += b[i]
if b[a-1] < c:
    print("YES")
else:
    print("NO")


a = int(input())
b = list(map(int, input().split()))
b.sort()
c = 0
for i in range(a-1):
    c += b[i]
if b[-1] < c:
    print("YES")
else:
    print("NO")


a = int(input())
b = list(map(int, input().split()))
b = sorted(b, reverse=True)
if sum(b) - b[0] > b[0]:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
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):
N = int(input())
Larray = list(map(int,input().split()))
lmax = max(Larray)
Larray.remove(lmax)
ltot = 0
for i in range(Larray):
  ltot += i
if lmax > ltot:
  print('Yes')
else:
  print('No')


N = int(input())
Larray = list(map(int,input().split()))
lmax = max(Larray)
Larray.remove(lmax)
ltot = 0
for i in Larray:
  ltot += i
if lmax < ltot:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
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):
n = int(input())
l = list(map(int, input().split()))
l.sort()
sum = 0
for i in range(n-1):
	sum += i
if sum > a[n-1]:
	print('Yes')
else:
	print('No')

n = int(input())
l = list(map(int, input().split()))
l.sort()
sum = 0
for i in range(n-1):
	sum += l[i]
if sum > l[n-1]:
	print('Yes')
else:
	print('No')

Verdicts: Runtime Error

Accepted
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):
a=input()
b=list(map(int,input().split()))
b.sort()
if b[len(b)-1]> sum(b[:len(b)-1]):
  print("Yes")
else:
  print("No")

a=input()
b=list(map(int,input().split()))
b.sort()
if b[len(b)-1]< sum(b[:len(b)-1]):
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
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):
import functools

n = input()
l = input().split()

if n < 3 or 10 < n:
  return 'No'

for _l in l:
	if _l < 1 or 100 < _l:
		return 'No'

longest = functools.reduce(lambda x,y: x if x > y else y, l)
sum = functools.reduce(lambda x,y: x + y, l) - longest

if longest > sum:
	return 'Yes'
else
	return 'No'



import functools

n = int(input())
l = list(map(lambda x: int(x), input().split()))
    
longest = functools.reduce(lambda x,y: x if x > y else y, l)
sum = functools.reduce(lambda x,y: x + y, l) - longest

if longest >= sum:
	print('No')
else:
	print('Yes')



Verdicts: Runtime Error

Accepted
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):

n=int(input())
L=list(map(int,input().split()))
L.sort()
ans=sum(L[:n-1])
if ans>L[n-1:n]:
    print('Yes')
else:
    print('No')

n=int(input())
L=list(map(int,input().split()))
L.sort()
ans=sum(L)-L[n-1]
if ans>L[n-1]:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Accepted
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):
n = int(input())
L = list(map(int, input().split()))
Lmax = L.max()
L.remove(Lmax)
print('Yes' if Lmax < L.sum() else 'No')

n = int(input())
L = list(map(int, input().split()))
Lmax = max(L)
L.remove(Lmax)
print('Yes' if Lmax < sum(L) else 'No')


Verdicts: Runtime Error

Accepted
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):
N = int(input())
L = list(map(int,input().split()))

m = L.pop(max(L))
if sum(L) > m:
    print('Yes')
else:
    print('No')

N = int(input())
L = list(map(int,input().split()))

m = L.pop(L.index(max(L)))
if sum(L) > m:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Accepted
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):
li = list(map(int,input().split()))
li[0] = 0
if max(li)<(sum(li)-max(li)):
	print ('Yes')
  
else:
	print ('No')

a=input()
li = list(map(int,input().split()))
li[0] = 0
if max(li)<(sum(li)-max(li)):
	print ('Yes')
  
else:
	print ('No')

li = list(map(int,input().split()))

if max(li)<(sum(li)-max(li)):
	print ('Yes')
  
else:
	print ('No')

a=input()
li = list(map(int,input().split()))
if max(li)<(sum(li)-max(li)):
	print ('Yes')
  
else:
	print ('No')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
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):
N=int(input())
lengths=[float(val) for val in input().split()]
max=max(lengths)
if sum(lengths)-max>max:
  print('yes')
else:
  print('no')

N=int(input())
lengths=[float(val) for val in input().split()]
max=max(lengths)
if sum(lengths)-max>max:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
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):
n=int(input())
a=[int(x) for x in input().split()]
mx=max(a)
rem=sum(a)-mx
if mx > rem:
    print("Yes")
else:
    print("No")

n=int(input())
a=[int(x) for x in input().split()]
mx=max(a)
rem=sum(a)-mx
if mx >= rem:
    print("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Accepted
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):
n=int(input())
lst=list(map(int,input().split()))
maxval=max(lst)
sumval=sum(lst)
if maxval<sumval-maxval:
    print('YES')
else:
    print('NO')

n=int(input())
lst=list(map(int,input().split()))
maxval=max(lst)
lst.remove(maxval)
sumval=sum(lst)
if maxval<sumval:
    print('YES')
else:
    print('NO')

n=int(input())
lst=list(map(int,input().split()))
lst.sort()
maxval=lst.pop(-1)
sumval=sum(lst)
sumval=sum(lst)
if maxval<sumval:
    print('YES')
else:
    print('NO')

n=int(input())
lst=list(map(int,input().split()))
maxval=max(lst)
sumval=sum(lst)
if maxval<sumval-maxval:
    print('Yes')
else:
    print('No')


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
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):

Ls = sorted(map(int, input().split()))
if Ls[-1] < sum(Ls) - Ls[-1]:
    print('Yes')
else:
    print('No')

n = int(input())
l = list(map(int, input().split()))

l.sort()

ans = 0
for i+1 in l:
	ans += l[i+1]
    
if l[0] < ans:
  print("Yes")
else:
  print("No")

N = int(input())
Ls = sorted(map(int, input().split()))
if Ls[-1] < sum(Ls) - Ls[-1]:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Runtime Error

Accepted
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):
N = int(input())

L = []

L = list(map(int, input().split(" ")))

saidai = max(L)

goukei  = sum(L)

goukei = goukei - saidai

if saidai < goukei :
    print("yes")
else:
    print("no")


N = int(input())

L = []

L = list(map(int, input().split(" ")))

saidai = max(L)

goukei  = sum(L)

goukei = goukei - saidai

if saidai < goukei:
    print("Yes")
else:
    print("No")
    

Verdicts: Wrong Answer

Accepted
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):
n = int(input())
b = list(map(int, input().rstirip().split()))
c = max(b)
d = 0
for i in b:
  d +=i
d -= c
if c < d:
  print(Yes)
else:
  print(No)

n = int(input())
b = list(map(int, input().rstrip().split()))
c = max(b)
d = 0
for i in b:
  d +=i
d -= c
if c < d:
  print(Yes)
else:
  print(No)

n = int(input())
b = list(map(int, input().rstrip().split()))
c = max(b)
d = 0
for i in b:
  d +=i
d -= c
if c < d:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
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 -*-

def main():
    int(input())
    l = [int(e) for e in input().split(" ")]
    max_l = max(l)
    s = 0
    once = True
    for e in l:
        if e != max_l and once:
            s += e
            once = False

    if max_l < s:
        print("Yes")
    else:
        print("No")

main()


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

def main():
    int(input())
    l = [int(e) for e in input().split(" ")]
    max_l = max(l)
    s = 0
    once = True
    for e in l:
        if e == max_l and once:
            once = False
            continue
        s += e

    if max_l < s:
        print("Yes")
    else:
        print("No")

main()


Verdicts: Wrong Answer

Accepted
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
N = int(input())
L = list(map(int, input().split()))
max_ = max(L)
if max_ < sum(L) - max_:
  print("YES")
else:
  print("NO")

#coding: utf-8
N = int(input())
L = list(map(int, input().split()))
max_ = max(L)
if max_ < sum(L) - max_:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
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):
n=int(input())

l=[]
for i in range(n):
  l.append(int(input()))

a=sum(l)-2*max(l)

if a<0 :
  print("Yes")
  
else:
  print("No")

N = int(input())
L=[int(x) for x in input().split()]
if sum(L)-max(L) > max(L):
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted