Problem:


Score : 200 points

Problem Statement

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.

Constraints

All values in input are integers.

3 \leq N \leq 10

1 \leq L_i \leq 100

Input

Input is given from Standard Input in the following format:

N
L_1 L_2 ... L_N

Output

If an N-sided polygon satisfying the condition can be drawn, print Yes; otherwise, print No.

Sample Input 1

4
3 8 5 1

Sample Output 1

Yes

Since 8 < 9 = 3 + 5 + 1, it follows from the theorem that such a polygon can be drawn on a plane.

Sample Input 2

4
3 8 4 1

Sample Output 2

No

Since 8 \geq 8 = 3 + 4 + 1, it follows from the theorem that such a polygon cannot be drawn on a plane.

Sample Input 3

10
1 8 10 5 8 12 34 100 11 3

Sample Output 3

No



Sample input:
4
3 8 5 1


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
nums = int(input())
input_list = [int(x) for x in input().split()]
input_list.sort(reverse=True)
max_num = input_list.pop(0)
print(input_list)
if max_num < sum(input_list):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int, input().split()))
s = 0

for i in range(n):
  s += l[i]
if max(l) < s:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

N = int(input())

hen_len_lst = input().split() #辺の長さのリスト

hen_len_sum = 0 #全ての辺の長さの合計

ans_flg = "Yes" #多角形が描けないと分かり次第"No"にする

for n in range(N):
    hen_len_sum += int(hen_len_lst[n])

for n in range(N):
    if int(hen_len_lst[n]) > (hen_len_sum - int(hen_len_lst[n])):
        ans_flg = "No"

print(ans_flg)

Submission status: Wrong Answer

Solution code:
a = int(input())
l = list(map(int,input().split()))
max = max(l)
sum = sum(l)
if max < (sum -max) :
  print("yes")
else :
  print("no")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))
for i in range(n):
  if sum(a) < 2*a[i]:
    print("No")
    break
  if i ==n-1:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
ls = list(map(int, input().split(" ")))
print("Yes" if 2*max(ls) > sum(ls) else "No")

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
    _ = int(stdin.readline().rstrip())
    Ls = [int(x) for x in stdin.readline().rstrip().split()]
    print('Yes' if max(Ls) < sum([x for x in Ls if x != max(Ls)]) else 'No')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    N = int(input())

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

    max_L =  max(L_list)

    sum_L_without_max = 0
    for L in L_list:
        if L != max_L:
            sum_L_without_max += L

    if max_L <= sum_L_without_max:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    N = int(input())

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

    max_L =  max(L_list)

    sum_L_without_max = 0
    for L in L_list:
        if L != max_L:
            sum_L_without_max += L

    if max_L < sum_L_without_max:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
_ = input()
data = list(map(int, input().split()))
data.sort()
if data[0] < sum(data[1:]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
hen_list = list(map(int,input().split()))
if sum(hen_list)-max(hen_list) > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

a = sorted(a)

if sum(a[0:-1]) > a[-1]:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))
a.sort()
if a[0]<sum(a[1:]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

M = max(l)
S = sum(l)

if M<S :
    s = 'Yes'
else:
    s = 'No'
    
print(s)

Submission status: Wrong Answer

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

M = max(l)
S = sum(l)

s = 'Yes' if M<S else 'NO'
print(s)

Submission status: Wrong Answer

Solution code:
# -*- 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()

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    N = int(input())
    L_list = list(map(int, (input().split(' '))))
    L_max = max(L_list)
    tmp = 0
    for L in L_list:
        if L != L_max:
            tmp += L
    if tmp > L_max:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

l.sort()
print(l[-1], sum(l[:-1]))
if l[-1] >= sum(l[:-1]):
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [int(i) for i in input().split()]
if 2 * max(l) - sum(l) <= 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
if 2 * max(l) - sum(l) > 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

print( "Yes" if edges[-1] > sum(edges[:-1]) else "No" )

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
count = 0
for i in range(N):
    if L[i] != max(L):
        count += L[i]
if count > max(L):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
lists = []
for i in range(N):
    if L[i] != max(L):
        lists.append(L[i])
if max(L) < sum(lists):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L =  input().split()
sum_len = 0

L_i = [int(s) for s in L]
print(L_i)
L_i.sort()

for i in range(N-1):
    sum_len = sum_len + int(L_i[i])

if sum_len > int(L_i[N-1]):
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=input()
l=list(map(int,input().split()))
l.sort()
x=l.pop(-1)
print("YES" if sum(l)>x else "NO")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int,input().split()))
L.sort()
print("NYoe s"[1 if (sum(L) - L[-1] > L[-1]) else 0])

Submission status: Wrong Answer

Solution code:
N=int(input())
L=list(map(int,input().split()))
L.sort(reverse=True)
if L[0]<sum(L[1:]):
    print('Yes')
else:
    print('NoS')

Submission status: Wrong Answer

Solution code:
#!/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])

Submission status: Wrong Answer

Solution code:
#!/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")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [int(i) for i in input().split()]
l = sorted(l)
m = l.pop(len(l)-1)
if m <= sum(l):
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
N=int(input())
l=list(map(int,input().split()))
if max(l)<sum(l)-max(l):
	print("Yes")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())
su = [ int(i) for i in input().split() ]
su.sort()
lastn = su.pop(n-1)

if sum(su) < lastn:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
ar = list(map(int, input().split()))

assert 3 <= n <= 10
assert len(ar) == n
assert (1 <= min(ar)) and (max(ar) <= 100)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
sum_L = 0

for l in L:
    if l != max(L):
        sum_L += l

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

Submission status: Wrong Answer

Solution code:
a= input()
b = input().split()
b = [int(s) for s in b]
s = 0
for i in range(0,len(b)):
    s+=int(b[i])
print(s)
if s-int(max(b))>int(max(b)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a= input()
b = input().split()
s = 0
for i in range(0,len(b)):
    s+=int(b[i])
if s-int(max(b))>int(max(b)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
L=[int(x) for x in input().split()]

M=max(L)
L_2=[x for x in L if x != M]

if M < sum(L_2):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

L.sort
if sum(L[:-1]) > L[-1]:
    ans = "Yes"
else: ans = "No"

print(ans)

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
_ = input()
l = [int(i)for i in input().split()]
print(l)
print("Yes" if 2*max(l) < sum(l) else "No")

Submission status: Wrong Answer

Solution code:
_ = input()
l = map(int,input().split())
print("Yes" if 2*max(l)<sum(l) else "No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
maxL = max(L)
sumL = sum(L)
if maxL > sumL - maxL:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int,input().split()))
L.sort()
if L[-1] < sum(L[0:-1]):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n,ans,l=int(input()),"Yes",list(map(int,input().split()))
for i in l:
  if sum(l)<i*2:ans="No"
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
a=sum(l)
ans='Yes'
for i in l:
  if a-i<i:
    ans='No'
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
Ls=list(map(int, input().split()))
Ls = sorted(Ls, reverse=True)
Lmax=Ls[0]
Lsum=0
for i in range(1,N):
    Lsum+=Ls[i]
if Lmax < Lsum:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
t = list(map(int, input().split()))
if max(t) * 2 > sum(t):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np 

N=int(input())
L=np.array([int(x) for x in input().split()])

m=L.max()
s=L[L < m]

if m<s.sum():
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
size = int(input())
sides = input().split()
ss = []
for x in sides:
  ss.append(int(x))
big = max(ss)
together = sum(ss)
if(big < together):
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int,input().split()))
print("YNeos"[max(L) > sum(L)-max(L)::2])

Submission status: Wrong Answer

Solution code:
def is_poly(n, l):
  s = 0
  m=max(l)
  for i in l:
    if i == m:
      pass
    else:
      s += i
  if m<s:
    return 'Yes'
  else:
    return 'No'


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l = map(int, input().split())
s = 0
t = 0
for x in l:
  s += x
  t = max(x, t)
if s>t:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(raw_input())
sides = map(int, raw_input().strip().split())

m = sides.remove(max(sides))

if m < sum(sides):
  print 'Yes'
else:
  print 'No'

Submission status: Wrong Answer

Solution code:
n = input()
l = list(map(int, input().split()))
print(["No","Yes"][sum(l)-max(l) >= max(l)])

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int,input().split()))
large = max(L)
gou = 0
for i in range(N):
	gou = gou + L[i]
if large < gou:
	print ("Yes")
else:
	print ("No")

Submission status: Wrong Answer

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

m = max(L_list)
result = 'yes' if sum(L_list) - m > m else 'no'
print(result)

Submission status: Wrong Answer

Solution code:
#%%
import numpy as np

#%%
n = int(input())

arr = np.array(list(map(int, input().split())))

maxid = np.argmax(arr)

if arr[maxid] < np.sum(arr) - arr[maxid]:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
#%%
import numpy as np

#%%
n = int(input())

arr = np.array(list(map(int, input().split())))

maxid = np.argmax(arr)
i = np.ones(n, dtype=bool)
i[maxid] = False

if arr[maxid] < np.sum(arr[i]):
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
x = int(input())

input_line = input()
info = list(map(int, input_line.split()))
max = max(info)
info.remove(max)

flag = True
for i in info:
    if max<=i:
        flag = False
        break
if flag ==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = [int(i) for i in input().split()]
if sum(a) > max(a) * 2:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
L.sort()

if sum(L) < L[N-1]*2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

def main():
    """ Code implementation """
    N = int(input())
    L = list(map(int, input().split()))
    longest = 0
    sum = 0
    for l in L:
        sum = sum + l
        if longest < l:
            longest = l
        
    if longest < (sum - longest):
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ls = list(map(int, input().split()))
max_elm = max(ls)
ls_sum = sum(ls)
if max_elm < ls_sum:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
L = (int(x) for x in input().split())

longest = max(L)
others = sum(L) - longest
if longest < others:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
lengths = list(map(int, input().split(' ')))
total = 0
longest = 0
for i in lengths:
  total += i
  if (i > longest):
    longest = i
possible = True
if (total - longest) < longest:
    possible = False
   
if possible:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_ = input()
n = [int(i) for i in input().split()]
print("YNeos"[0>sum(n)-max(n)*2::2])

Submission status: Wrong Answer

Solution code:
_ = input()
n = [int(i) for i in input().split()]
print("YNeos"[0<sum(n)-max(n)*2::2])

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int,input().split()))
L.sort(reverse=True)
sum = 0
for i in range(1,N,1):
  sum += L[i]
print(sum, L[0])
if sum > L[0]:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def solve(string):
    n, *l = map(int, string.split())
    l= sorted(l)
    return "Yes" if sum(l[:len(l)-1]) > l[-1] else "No"


if __name__ == '__main__':
    input()
    print(solve(input()))

Submission status: Wrong Answer

Solution code:
def solve(string):
    n, *l = map(int, string.split())
    l = sorted(l)
    return "Yes" if sum(l[:-1]) > l[-1] else "No"


if __name__ == '__main__':
    input()
    print(solve(input()))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(n) for n in input().split()]
maxA = max(A)
if maxA < sum(A) - maxA:
 print("yes")
else:
 print("no")

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(n) for n in input().split()]
maxA = max(A)
if maxA < sum(A) - maxA:
	print("yes")
else:
	print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i=input;i();l=map(int,i().split());print(["No","Yes"][max(l)*2<sum(l)])

Submission status: Wrong Answer

Solution code:
s1=input()
s2=input().split()
a=sorted(s2,reverse=True)

max=int(a[0])
cnt=a[1:]
all=sum(int(i) for i in cnt)

if(max<all):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s1=input()
s2=input().split()
a=sorted(s2,reverse=True)

max=int(a[0])
cnt=a[1:]
all=sum(int(i) for i in cnt)

if(max<all):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# the number of inputs
N = int(input())
# each length of edges
Ls= list(map(int, input().split()))

# searching largest one
largestL = 0
largestIndex = 0

# straightforward way
for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i
print(largestL)
sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]

if sumOfSmallLs > largestL:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# the number of inputs
N = int(input())
# each length of edges
Ls= list(map(int, input().split()))

# searching largest one
largestL = 0
largestIndex = 0
 
# straightforward way
for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i
 
sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]
 
if sumOfSmallLs < largestL:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a= int(input())
b=list(map(int,input().split()))
c=max(b)
if sum(b)-c>c:
       print("YES")
else:
       print("NO")

Submission status: Wrong Answer

Solution code:
a= int(input())
b=list(map(int,input().split()))
c=max(b)
if sum(b)-c<c:
       print("YES")
else:
       print("NO")

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())
len_box = []
for _ in input().split():
    len_box.append(int(_))
len_box = np.array(len_box)
len_max = np.max(len_box)
len_sum = np.sum(len_box)
if (len_sum-len_max) > len_max:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
print("YES" if max(L)*2<sum(L) else "NO")

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    l = list(map(int,input().split()))

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

    if (s > 0):
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    l = list(map(int,input().split()))
    lmax = max(l)

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

    if s > 0:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    l = list(map(int,input().split()))
    lmax = max(l)



    if lmax < ( sum(l) - lmax ) :
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    l = list(map(int,input().split()))
    lmax = max(l)

    l.remove(lmax)

    if lmax < sum(l) :
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    l = list(map(int,input().split()))
    s = 0
    lmax = max(l)

    l.remove(lmax)

    for i in l:
        s += i
    if lmax < s :
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    l = list(map(int,input().split()))
    s = 0
    lmax = max(l)

    l.remove(lmax)

    for i in l:
        s += i
    if lmax < s :
        print("YES")
    elif lmax >= s :
        print("NO")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = map(int, input().split())
L = map(int, input().split())

max_length = max(L)

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

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
N = int(input())
L_ls = [int(i) for i in input().split()]
print(L_ls)
if sum(L_ls) - 2*max(L_ls) > 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
max = 0
total = 0
for i in range(N-1):
    if max < int(L[i]):
        max = int(L[i])
    else:
        pass
for i in range(N-1):
    total += int(L[i])
total = total - max

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

Submission status: Wrong Answer

Solution code:
N = int(input())
l_list = list(map(int, input().split()))

max_len = max(l_list)
other_total = sum(l_list) - max_len

if max_len < other_total:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
n = int(input())

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

if sum(x) - max(x) > 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
l = [int(i) for i in input().split()]

l_sum = 0
for i in l:
    if not i == max(l):
        l_sum += i

if max(l) < l_sum:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
Llist = list(map(int, input().split()))
 
sum = 0
for i in Llist:
  if i != max(Llist):
    sum += i
 
if max(Llist) <= sum:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
Llist = list(map(int, input().split()))
 
sum = 0
for i in Llist:
  if i != max(Llist):
    sum += i
 
if max(Llist) < sum:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
Llist = list(map(int, input().split()))

sum = 0
for i in Llist:
  if i != max(Llist):
    sum += i

if max(Llist) > sum:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

sides = sorted(map(int, input().split()))

result = "No"
if sides[-1] <= sum(sides[:-2]):
  result = "Yes"

print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())

sides = sorted(map(int, input().split()))

result = "No"
if sides[-1] > sum(sides[:-2]):
  result = "Yes"

print(result)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input())

# n回ループして配列に入れる
maximum = 0
other = 0
inputList = input().split() # ソートして入力値を受け取る
inputList.sort()

if maximum < sum(int(i) for i in inputList[:index-1]):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input())

# n回ループして配列に入れる
maximum = 0
other = 0
inputList = input().split() # ソートして入力値を受け取る
inputList.sort()

if maximum < sum(int(i) for i in inputList):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input('input num : '))

# n回ループして配列に入れる
maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input('input num : '))

# n回ループして配列に入れる
maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input('input num : '))

# n回ループして配列に入れる
maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input('input num : '))

# n回ループして配列に入れる
maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l=input().split()
for i in range(n):
    l[i] = int(l[i])

l.sort()
max = l.pop(-1)
sum = sum(l)
if sum>max:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N=int(input())
L=list(map(int,input().split()))
max1=max(L)
b=sum(L)
if max1>=b:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n=int(input())
t=list(map(int,input().split(" ")))

t_max=max(t)

j=0
t_sum=0
while j<=n-1:
    t_sum+=t[j]
    j+=1
        
if t_sum>2*t_max:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
num = input().split(" ")
M = int(max(num))
ans = 0
for i in num:
    t = int(i)
    ans +=t 
if ans>2*M:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if max(l) < sum(l) - max(l) :
    print("Yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
import numpy as np

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

max_value = np.max(L)
sum_value = np.sum(L)
print("YES" if sum_value > 2 * max_value else "NO")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

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