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())
a = [int(i) for i in input().split()]
if(max(a) > (sum(a) - max(a)):
   print("NO")
else:
   print("YES")

n = int(input())
a = [int(i) for i in input().split()]
if(max(a) >= (sum(a) - max(a))):
   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):
li = [int(x) for x in input().split() if x != "0"]
lmax = max(li)
a = sum(li) - lmax
if a > lmax:
  print("Yes")
else:
  print("No")

li = [int(x) for x in input().split() if x != "0"]
lmax = max(li)
a = sum(li) - lmax
if a > lmax:
  print("Yes")
else:
  print("No")

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

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

N = int(input())
li = [int(x) for x in input().split()]
lmax = max(li)
a = sum(li) - lmax
if a > lmax:
  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())
L = []
L = list(map(int, input().split()))

M = max(L)
L2 = L.remove(M)
if M < sum(L2):
	print('Yes')
else:
	print('No')

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

M = max(L)
L.remove(M)
if M < 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())
ls = input().split()

max_ls = int(max(ls))

sum_ls = 0

for i in range(n):
    sum_ls += int(ls[0])

if sum_ls - max_ls > max_ls :
    print("Yes")
else:
    print("No")

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

max_ls = max(ls)

sum_ls = sum(ls)


if sum_ls - max_ls > max_ls :
    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 = input()
m = list(map(int,input().split()))
m = m.sorted()
if m[-1] < sum(m) - m[-1]:
  print('Yes')
else:
  print('No')

n = input()
m = list(map(int,input().split()))
m.sort()
if m[-1] < sum(m) - m[-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 = input();
l = list(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')





N = input()
N = int(N)
l = list(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')





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

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()))
for i in range(N):
  if sum(L) - L(i) <= L(i):
    print('No')
    exit()
print('Yes')

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

N = int(input())
list = list(map(int, input().split()))
print("Yes" if max(list)*2 < sum(list) else "No"))

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

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

N = int(input())
list = list(map(int, input().split()))
print("Yes" if 2*max(list) < sum(list) else "No")

Verdicts: Runtime Error

Runtime Error

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()))

sum = int(0)
a = max(L)

for i in range(n):
  sum += L[i]
  
if 2*a > sum:
  print("Yes")
else:
  print("No")

n = int(input())

L = [map(int,input().split())]

sum = int(0)
a = max(L)

for i in range(n):
  sum += L[i]
  
if 2*a > sum:
  print("Yes")
else:
  print("No")

n = int(input())

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

sum = int(0)
a = max(L)

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

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


L_max = max(L)

L_Down = L.sort(reverse=True)

L_Down_Re = L.Down[1:len(L_Down)]

L_Down_Re_Sum =  sum(L_Down_Re)

if L_max <= L_Down_Re_Sum:
    print("No")
else:
    print("Yes")

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

L_max = max(L)

print(L_max)

L_Down =sorted(L,reverse=True)

print(L_Down)

L_Down_Re = L_Down[1:len(L_Down)]

print(L_Down_Re)

L_Down_Re_Sum =  sum(L_Down_Re)

print(L_Down_Re_Sum)

if L_max <= L_Down_Re_Sum:
    print("Yes")
else:
    print("No")

N = int(input())
L = sorted([int(_) for _ in input().split()])
if L[N - 1] < sum(L[:N - 1]):
    print('Yes')
else:
    print('No')

Verdicts: 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 = input()
L = [int(input()) for i in range(N)]
print("Yes" if sum(L) > 2*max(L) else "No")

N = int(input())
L = [int(input()) for i in range(N)]
print('Yes' if sum(L)-max(L) > max(L) else 'No')

N = int(input())
L = [int(input()) for i in range(N)]
print('Yes' if sum(L)-max(L) > max(L) and sum(L) -max(L) == max(L) + 1 else 'No')


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

Verdicts: Runtime Error

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

max = 0
ignore = 0
temp = 0

for i, value in enumerate(li):
  if value > max:
    max = value
    ignore = i

for i, value in enumerate(li):
  if i == ignore:
    continue
  else:
    temp += value
    
if max < temp:
  print("YES")
else:
  print("NO")

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

max = 0
ignore = 0
temp = 0

for i, value in enumerate(li):
  if value > max:
    max = value
    ignore = i

for i, value in enumerate(li):
  if i == ignore:
    continue
  else:
    temp += value
    
if max < temp:
  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):
from sys import stdin
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]

if max(L) < sum(L) - max(L):
    print('YES')
else:
    print('NO')


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


from sys import stdin
N = int(stdin.readline().rstrip())
L = [int(x) for x in stdin.readline().rstrip().split()]

if max(L) < sum(L) - max(L):
    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):
# -*- coding: utf-8 -*-

n=int(input())  
h=list(map(int, input().split()))  
cnt=0
L=0
while L != len(h):
    if h[L] != 0:
        for r in range(L+1 ,len(h)):
            if h[r] == 0:
                
                for k in range(L,r):
                    h[k]-=1
                cnt+=1
                break
        else:
            r = len(h)
            for k in range(L,r):
                h[k]-=1
            cnt+=1
    elif h[L] == 0:
        L+=1
print(cnt)


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

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

L.sort(key=lambda x:-x)

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

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

L.sort(key=lambda x:-x)

if L[0] >= sum(L[1::]):
  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):
#!/usr/bin/env python3

N = int(input())
L = input().split()
L_num = []

for i in range(len(L)):
    L_num.append(int(L[i]))

L_num.sort()

total = 0
for j in range(len(L) - 1):
    total += L_num[j]

if total <= L_num[N-1]:
    print("No")
else:
    print("Yes")

print(total)
print(L_num[N-1])


#!/usr/bin/env python3

N = int(input())
L = input().split()
L_num = []

for i in range(len(L)):
    L_num.append(int(L[i]))

L_num.sort()

total = 0
for j in range(len(L) - 1):
    total += L_num[j]

if total <= L_num[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 = [int(i) for i in input().split()]

l.sort()
l.reverse()
cnt = 0
for i in range(n-1):
	cnt += l[i]
if cnt > l[n]:
	print("Yes")
else:
	print("No")

n = int(input())
l = [int(i) for i in input().split()]

l.sort()
cnt = 0
for i in range(n-1):
	cnt += l[i]
if cnt > 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(" ")))

print(sum(l))
m=max(l)
if m - (sum(l)-m):
    print("Yes")
else:
    print("No")

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

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

import numpy as np
n = int(input())
l = list(map(int, input().split()))
a = max(l)
b = l.remove(a)
c = np.sum(b)
if a < c:
    print('Yes')
else:
    print('No')

#import numpy as np
n = int(input())
l = list(map(int, input().split()))
a = max(l)
l.remove(a)

c = sum(l)
if a < 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):
num = int(input())
lens = [int(a) for a in input().split(' ')]
max_len = max(len)
lens.remove(max_len)
sum_lens = sum(lens)

if max_len < sum_lens:
  print('Yes')
else:
  print('No')  

num = int(input())
lens = [int(a) for a in input().split(' ')]
max_len = max(lens)
lens.remove(max_len)
sum_lens = sum(lens)
 
if max_len < sum_lens:
  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())
list_L = map(int, input().split())

max_ = list_L.pop(list_L.index(max(list_L)))

if max_ > sum(list_L):
    print("Yes")
else:
    print("No")


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

max_ = list_L.pop(list_L.index(max(list_L)))

if max_ >= sum(list_L):
    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):
import sys
N = int(sys.stdin.readline().rstrip())
l = list(map(int, sys.stdin.readline().rstrip().split()))

lm = 0
L = 0
for n in range(N):
  if l[n] > lm:
    L += lm
    lm = l[n]
  else:
    L += l[n]
    
if lm > L:
  print('Yes')
else:
  print('No')

import sys
N = int(sys.stdin.readline().rstrip())
l = list(map(int, sys.stdin.readline().rstrip().split()))
 
lm = 0
L = 0
for n in range(N):
  if l[n] > lm:
    L += lm
    lm = l[n]
  else:
    L += l[n]
    
if lm < 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())
L_list = list(map(int, input().split()))

if max(L_list) * 2 > sum(L_list):
    print('Yes')
else:
    print('No')

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

if max(L_list) * 2 < sum(L_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())
B = list(map(int, input().split(" ")))

max_b = max(B)
if sum(B) - max_b > max_b:
    print("YES")
else:
    print("NO")


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

max_b = max(B)
if sum(B) - max_b > max_b:
    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):
num = int(input())
l = list(map(int, input().split()))
max = l.pop(l.index(max(l)))
sum = 0
for i in range(len(l)):
    sum = sum + l[i]
if sum > max:
    print('No')
else:
    print('Yes')


num = int(input())
l = list(map(int, input().split()))
max = l.pop(l.index(max(l)))
sum = 0
for i in range(len(l)):
    sum = sum + l[i]
if sum >= max:
    print('No')
else:
    print('Yes')


num = int(input())
l = list(map(int, input().split()))
max = l.pop(max(l))
for i in range(len(l)):
    if max < l[i]:
        print('No')
        exit(0)
print('Yes')


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


Verdicts: 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):
10
1 8 10 5 8 12 34 100 11 3

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

L.sort()
L.reverse()

if L[0] < sum(L)-L[0]:
    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):
def resolve():
    n = int(input())
    L = map(int, input().split())
    M = max(L)
    R = sum(L) - M
    if R > M:
        print('Yes')
    else:
        print('No')
resolve()        

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

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(int,input().split()))

sum_=sum(L)
max_=max(L)
if(max_>sum_-max_):
    print('Yes')
else:
    print('No')

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

sum_=sum(L)
max_=max(L)
if(max_<sum_-max_):
    print(max_,sum_-max_)
    print('Yes')
else:
    print('No')

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

sum_=sum(L)
max_=max(L)
if(max_<sum_-max_):
    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=list(map(int, input().split()))

a=max(L)
b=sum(L)-a

if a>=B:
  print('No')
else:
  print('Yes')

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

a=max(L)
b=sum(L)-a

if a>=b:
  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()
max_L = L[-1]
del L[-1]
if max_L > sum(L):
    print("Yes")
else:
    print("No")

N = int(input())
L = list(map(int, input().split()))
L.sort()
max_L = L[-1]
del L[-1]
if max_L >= sum(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=int(input())
a=list(map(int,input().split()))


if max(a)*2 >= sum(a):
  print("Yes")
else:
  print("No")

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


if max(a)*2 < sum(a):
  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 = list(map(int, input().split()) for _ in range(n))

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

n = int(input())
l = list(map(int, input().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 = [input() for i in range(n)]
kekka = 0
for i in range(n):
  if 2*L[i] > sum(L):
    kekka = 1
    break
    
if kekka == 1:
  print('No')
else:
  print('Yes')

n = int(input())
L = list(map(int,input().split()))
kekka = 0
for i in range(n):
  if 2*L[i] >= sum(L):
    kekka = 1
    break
    
if kekka == 1:
  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())
list = [map(int, input().split())]
if max(list) < sum(list) - max(list):
  print("Yes")
else:
  print("No")

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

if max(deta) < sum(deta) - max(deta):
    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 = [int(i) for _ in 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

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


if __name__ == "__main__":
    solve()

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

def solve():
    N = int(input())
    L = list(map(int, input().split()))
    L.sort()
    
    longest = L[-1]
    sum = 0
    for i in range(len(L)-1):
        sum += L[i]
    
    if longest < sum:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    solve()

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_lst = map(int, input().split())

L_lst.sort()
L_sum = sum(L_lst)
L_max = L_lst[-1]

if L_max * 2 >= L_sum:
  print("No")
else:
  print("Yes")

N = int(input())
 
L_lst = list(map(int, input().split()))
 
L_lst.sort()
L_sum = sum(L_lst)
L_max = L_lst[-1]
 
if L_max * 2 >= L_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):
s = int(input())
n = "1"
string_list = [input() for i in range(n)]
int_list = (int(s) for s in string_list)
m = max(int_list)
if sum(int_list) - int(m) > int(m):
    print("Yes")
elif print("NO")

s = int(input())
n = "1"
string_list = [input() for i in range(n)]
int_list = (int(s) for s in string_list)
m = max(int_list)
if sum(int_list) - int(m) > int(m)
else print("Yes")
elif print("NO")

s = int(input())
n = int(1)
string_list = [input().split() for i in range(n)]
int_list = [int(s) for s in string_list]
m = max(int_list)
if sum(int_list) - int(m) > int(m):
    print("Yes")
else:
    print("NO")

s = int(input())
A = list(map(int, input().split())) 
m = max(A)
if sum(A) - int(m) > int(m):
    print("Yes")
elif sum(A) - int(m) <= int(m):
    print("No")

Verdicts: Runtime Error

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()))
L.sort().reverse()
if L[0] < sum(L[1:n]):
  print("Yes")
else:
  print("No")

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


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

n = int(input())
ls = list(map(int, input().split()))
maxl = max(ls)
ls.pop(ls.index(maxl))
if sum(ls) > maxl:
  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())
lengths = list(map(int, input().split()))

truth = True
for i in range(len(lengths)):
	curr = lengths[:i]+lengths[i+1:]
	if curr < lengths[i]:
		truth = False
		break
	
print(["No","Yes"][truth])

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

truth = True
for i in range(len(lengths)):
	curr = lengths[:i]+lengths[i+1:]
	if sum(curr) <= lengths[i]:
		truth = False
		break
	
print(["No","Yes"][truth])

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(i) for i in input().split()]

Ld = sorted(L, reverse=False)
print(Ld)

L_other=0
for i in range(N-1):
  L_other += Ld[i]

print(L_other)
print(Ld[N-1])
if (Ld[N-1] < L_other):
  print('Yes')
else:
  print('No')


N=int(input())
L = [int(i) for i in input().split()]

Ld = sorted(L, reverse=False)
print(Ld)

L_other=0
for i in range(N-1):
  L_other += Ld[i]

if (Ld[N-1] < L_other):
  print('Yes')
else:
  print('No')


N=int(input())
L = [int(i) for i in input().split()]

Ld = sorted(L, reverse=False)

L_other=0
for i in range(N-1):
  L_other += Ld[i]

if (Ld[N-1] < L_other):
  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 = list(map(int, input().split()))
max_num = 0
max_index = 0
total = 0

for i in range(n):
  if max_num < l[i]:
    max_num = l[i]
    max_index = i


l.pop(max_index)
print(l)

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

if total > max_num: print("Yes")
else: print("No")





n = int(input())
l = list(map(int, input().split()))
max_num = 0
max_index = 0
total = 0

for i in range(n):
  if max_num < l[i]:
    max_num = l[i]
    max_index = i

l.pop(max_index)

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

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

n = int(input())
a = list(map(int, input().split()))
M = max(a)
a.remove(M)

if M > sum(a):
  print('Yes')
else:
  print('No')

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

lmax = max(L)
L.remove(lmax)
tot = sum(L)

if lmax < tot:
    print('Yes')
else:
    print('No')

Verdicts: 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):
#ABC117 B
N = int(input())
Ln = [input() for i in range(N)]
Ln.sort()
max = L[0]
sun = 0
for i in N-1:
    sum += L[i+1]
    
if max < sum:
    print("Yes")
else:
    print("No")


#ABC117 B
N = int(input())
Ln = list(map(int, input().split()))
Ln.sort()
max = L[0]
sum = sum(ln)
    
if max < max - sum:
    print("Yes")
else:
    print("No")


#ABC117 B
N = int(input()
Ln = [input() for i in range(N)]
Ln.sort()
max = L[0]
sun = 0
for i in N-1:
sum += L[i+1]
    
if max < sum:
    print("Yes")
else:
    print("No")


#ABC117 B
N = int(input())
Ln = list(map(int, input().split()))
Ln.sort(reverse=True)
max = Ln[0]
sum = sum(Ln)
    
if max < sum - max:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

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(inout())
L = int(input().split())
flag = 0

for i in range(N):
  total += L[i]

for i in range(N):
  if A[i]*2 >= total:
    print("No")
    flag = 1
    break

if flag == 0:
  print("Yes")

N = int(inout())
L = int(input().split())
flag = 0

for i in range(N):
  total += L[i]

for i in range(N):
  if L[i]*2 >= total:
    print("No")
    flag = 1
    break

if flag == 0:
  print("Yes")


N = int(inout())
L = input().split()
flag = 0

for i in range(N):
  L[i] = int(L[i])
  total += L[i]

for i in range(N):
  if L[i]*2 >= total:
    print("No")
    flag = 1
    break

if flag == 0:
  print("Yes")


N = int(input())
L = map(int,input().split())
max = 0
count = 0

for i in range(N):
  count += L[i]
  if max < L[i]:
    max = L[i]
    
if count < 2*max:
  print("Yes")
else:
  print("No")
  

N = int(input())
L = input().split()
flag = 0
total = 0

for i in range(N):
  L[i] = int(L[i])
  total += L[i]

for i in range(N):
  if L[i]*2 >= total:
    print("No")
    flag = 1
    break

if flag == 0:
  print("Yes")

Verdicts: Runtime Error

Runtime Error

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 = input()
l = map(int, input().split())

l_max = max(l)
l_sum = sum(l)

if l_max < l_sum - l_max:
	print("Yes")
else:
	print("No")

a = input()
l = map(int, input().split())

l_max = max(l)
l_sum = sum(l)

if 2 * l_max < l_sum:
	print("Yes")
else:
	print("No")

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

l_max = max(l)
l_sum = sum(l)

if l_max < l_sum - l_max:
	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())
nums = list(map(int, input().split()))
mx = nums.pop(max(nums))
if mx < sum(nums):
  print("Yes")
else :
  print("No")
  

n = int(input())
nums = list(map(int, input().split()))
mx = nums.pop(nums.index(max(nums)))
if mx < sum(nums):
  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();s=map(int,input().split());print('YNeos'[sum(s)-max(s)*2<1::2])

_,a=open(0);*a,=map(int,a.split());print('YNeos'[sum(a)<=max(a)*2::2])

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())
sl = input()
l = [int(n) for n in sl.split(" ")]

max = max(l);
l.remove(max);

all = 0

for p in l:
    all+=p

if all > max:
	print("No")
else:
	print("Yes")
	

n = int(input())
sl = input()
l = [int(n) for n in sl.split(" ")]

max = max(l);
l.remove(max);

all = 0

for p in l:
    all+=p

if all > max:
  print("No")
else:
  print("Yes")
	

n = int(input())
sl = input()
l = [int(n) for n in sl.split(" ")]

max = max(l);
l.remove(max);

all = 0

for p in l:
    all+=p

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

N=int(input())
bars=list(map(int,input().split()))
if max(bars)<sum(bars)-max(bars):
  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 l.count(max(l)) >= 2:
    print("No")
    break
elif max(l) < sum(l) - max(l):
    print("Yes")
else:
    print("No")

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

if l.count(max(l)) >= 2:
    print("No")
    break
elif 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 = input().split()
L = [int(s) for s in L]
i = 0
L_max = 0
for i in range(len(L)):
    if L_max < L[i]:
        L_max = L[i]
if L_max > sum(L):
    print("Yes")
else:
    print("No")


N = int(input())
L = input().split()
L = [int(s) for s in L]
i = 0
L_max = 0
for i in range(len(L)):
    if L[i] < L[i+1]:
        L_max = L[i+1]
if L_max > sum(L):
    print("Yes")
else:
    print("No")        

N = int(input())
L = input().split()
L = [int(s) for s in L]
i = 0
L_max = 0
for i in range(len(L)):
    if L_max < L[i]:
        L_max = L[i]
if L_max > sum(L) - L_max:
    print("Yes")
else:
    print("No")


N = int(input())
L = input().split()
L = [int(s) for s in L]
i = 0
L_max = L[0]
for i in range(len(L)):
    if L_max < L[i]:
        L_max = L[i]
if L_max < sum(L) - L_max:
    print("Yes")
else:
    print("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):
input_a = int(input())
input_list = list(map(int, input().split()))
input_list.sort()
sum = 0
for i in range(input_a - 1):
    sum += input_list[i]

if input_list[input_a - 1] < sum:
    print("yes")
else:
    print("No")

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

if input_list[input_a - 1] < sum:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted