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

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

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
Ls = nl()

Ls = sorted(Ls, reverse=True)
if Ls[0] < sum(Ls[1:]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())

List = list(map(int, input().split()))
# List = [map(int, input().split()) for i in range(N)]
# print(List)

Max = max(List)
Sum = sum(List)

if(Max < Sum - Max):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''
N = int(input())
L = list(map(int, input().split()))

L.sort()
sum = 0

for i in range(0, N - 1):
	sum += L[i]
	
sum -= L[N - 1]
if sum > 0:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

llist.sort()
if llist[-1]<sum(llist[0:-1]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

M = max(List)
List.remove(M)

if M<sum(List):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
l = list(map(int,input().split(' ')))
lmax = max(l)
del l[l.index(lmax)]
if lmax < sum(l):
  print('Yes')
else:
  print('No')
  
  
#print(lmax,sum(l))

Submission status: Accepted

Solution code:
N=int(input())
L=input().split()
S=M=0
for i in range(N):
    L[i]=int(L[i])
    if L[i]>M:
        M=L[i]
    S+=+L[i]
if S>2*M:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
length = list(map(int, input().split()))
length_max = max(length)

if length_max < sum(length) - length_max:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n= int(input())
a = list(map(int, input().split()))
a.sort()
sum=0
for i in range(n-1):
  sum=sum+a[i]
if sum>a[n-1]:
  print('Yes')
  sys.exit()
print('No')

Submission status: Accepted

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

ml = max(lst)
sl = sum(lst) - ml

if ml < sl:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
L = [int(x) for x in input().split()]
max_L = max(L)
idx_max_L = L.index(max_L)
rest_sum_L = 0
for i in range(N):
  if i != idx_max_L:
    rest_sum_L += L[i]
 
if rest_sum_L > max_L:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def abc():
    input()
    sides = sorted(map(int, input().rstrip().split()))
    max_sides = sides.pop(-1)
    if max_sides < sum(sides):
        print('Yes')
    else:
        print('No')


abc()

Submission status: Accepted

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

lmax = max(ln)
lsum = sum(ln)

if lmax < (lsum-lmax):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

mlen = max(L)
slen = sum(L)

if (slen - mlen) <= mlen:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
l.sort(reverse=True)
long = l[0]
others = sum(l) - long
if long < others:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

if sum(L) - 2 * max(L) > 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

s = sum(l)

for i in l:
    if i >= s - i:
        print('No')
        break
else:
    print('Yes')

Submission status: Accepted

Solution code:
n = int(input())
l = sorted(list(map(int, input().split())),reverse=True)
maxNum = l[0]
sumNum = sum(l[1:])

if maxNum < sumNum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

s = sum(A)
a = max(A)

answer = 'No' if a >= s-a else 'Yes'
print(answer)

Submission status: Accepted

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

maxL = max(L)
total = sum(L)
exceptLongest = total - maxL

if maxL < exceptLongest:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

L = sorted(map(int,input().split(" ")),reverse=True)

#print(L)

judge = "Yes" if L[0] < sum(L[1:]) else "No"

print(judge)

Submission status: Accepted

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

Submission status: Accepted

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

M = max(L)

if M < sum(L)/2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Solution code:
lst = []
N = int(input())
lst = list(map(int, input().split()))

max = max(lst)
lst.remove(max)

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

Submission status: Accepted

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

Submission status: Accepted

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

print("Yes" if sum(L) - max(L) > max(L) else "No")

Submission status: Accepted

Solution code:
n=int(input())
l=[int(x) for x in input().split()]
sum_l=sum(l)
def solve():
    for li in l:
        if li*2>=sum_l:
            return False
    return True
if solve():
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

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

L.sort()

val = 0
for i in range(N-1):
    val += L[i]

if val > L[N-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")


N = int(sys.stdin.readline())
L = list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

Solution code:
#定理 : 一番長い辺が他のN−1辺の長さの合計よりも真に短い場合に限り、条件を満たすN角形が描ける。
N = int(input())
L = list(map(int, input().split()))

L = sorted(L, reverse=True)
if L[0] < sum(L)-L[0]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

L.sort()
longest = L.pop()

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

Submission status: Accepted

Solution code:
# ContestName
# URL
import sys
#import numpy as np

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    L = i2nn()
    L.sort()
    l1 = sum(L[:-1])
    l2 = L[-1]
    if l1 > l2:
        print('Yes')
    else:
        print('No')

main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

max_length = max(L)
L.remove(max(L))

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

sL = sorted(L,reverse=True)
sum = 0
for i in range(1,len(sL)):
    sum += sL[i]

if sL[0] < sum:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

L.sort()

maxL = max(L)

sumL = sum(L[0:-1])

if maxL < sumL:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

M = max(L)

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

Submission status: Accepted

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)
if max_num < sum(input_list):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

s = sum(L)
m = max(L)

if s - m > m:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def p(a):
    print(a)

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

p("Yes" if l[0]<sum(l)-l[0] else "No")

Submission status: Accepted

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

m = max(l)
d = sum(l)-m

if d>m:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
L = [int(s) for s in input().split(" ")]
max_L = 0
sum_L = 0
for l in L:
  if l > max_L:
    max_L = l
  sum_L += l
 
if sum_L - max_L > max_L:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

a.sort(reverse=True)
if a[0] < sum(a[1:]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
_ = input()
ls = list(map(int, input().split()))
maxlen = max(ls)
ls.remove(maxlen)
print("Yes" if sum(ls)>maxlen else "No")

Submission status: Accepted

Solution code:
n = int(input())
L = [int(x) for  x in input().split()]
m = max(L)
s = sum(L)-m
if s>m:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
longest = max(L)
L.remove(longest)
sum = 0

for i in L:
    sum += i

if sum > longest:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

if 2*max(L) - sum(L) >= 0:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 - max(l):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n=int(input())
lst=list(map(int,input().split()))
mx,i=max(lst),lst.index(max(lst))
lst.pop(i)
if sum(lst)>mx:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

    maxv = max(l)
    maxi = l.index(maxv)

    print('Yes') if maxv < sum(l[:maxi] + l[maxi+1:]) else print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Solution code:
N=int(input())
L=list(map(int,input().split()))
M=max(L)
ans=0
L.remove(int(M))
for i in L:
  ans=ans+i

if ans > M:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
li = list(map(int, input().split()))
s = sum(li)
m = max(li)

if (s - m) > m:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
from functools import reduce
from operator import add

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

lst.sort()
m = lst.pop()
s = reduce(add,lst)
if m < s:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

L.sort()

lower = sum(L) - L[-1]

if lower  > L[-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

dekai = max(l)
l.remove(max(l))
lst_sum = sum(l)

if dekai < lst_sum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

num_list = [ int(v) for v in input().split() ]
max_length = max(num_list)
if max_length*2 >= sum(num_list):
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
N = int(stdin.readline().rstrip())
L = np.array([int(x) for x in stdin.readline().rstrip().split()])
LS = np.sort(L)[::-1]
if LS[0] < np.sum(LS[1:]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
L_list = [int(e) for e in input().split()]

L_list.sort(reverse=True)

Longest_L=L_list[0]
all_L=0
for i in range(1,N):
  all_L+=L_list[i]
  
if all_L>Longest_L:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
most = L.pop(0)
_v = 0
for v in L:
    _v += v
if most < _v:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
ma=0
su=0
for i in range(n):
  if l[i]>ma :
    ma=l[i]
  su+=l[i]

print("Yes" if su-ma>ma else "No")

Submission status: Accepted

Solution code:
N = int(input())
L = sorted([int(x) for x in input().split()])
max = max(L)
del (L[N-1])
print("Yes" if max < sum(L) else "No")

Submission status: Accepted

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

max = 0
maxidx = 0
sum = 0
for i in range(N):
    sum += L[i]
    if L[i] > max:
        max = L[i]
        maxidx = [i]

sum -= max

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

Submission status: Accepted

Solution code:
N=int(input())
inl = list(map(int,input().split()))
inl.sort(reverse=True)

if inl[0] < sum(inl[1:]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    _ = int(input())
    l_lst = [int(x) for x in stdin.readline().split()]
    l_lst.sort(reverse=True)
    if l_lst[0] < sum(l_lst)-l_lst[0]:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

# 初期値を入力

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


# メインプログラム

L = np.array(L)
Max_L = max(L)

if Max_L < sum(L) - Max_L:
    print("Yes")

else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
l = list(map(int, input().split()))
l.sort()

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

Submission status: Accepted

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

l_max = max(l_list)
l_list.remove(l_max)
l_sum = sum(l_list)

if(l_max < l_sum):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

lst = []
for i in map(int, input().split()):
    lst.append(i)

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

Submission status: Accepted

Solution code:
def sub():
    N = int(input())
    Ls = [int(e) for e in input().split()]
    Ls = sorted(Ls)
    a = sum(Ls[:-1])
    b = Ls[-1]
    if b < a:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    sub()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = input()
long, *l = sorted(list(map(int, input().split())), reverse=True)


total = 0
for i in l:
    total = total + i

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = [int(x) for x in input().split()]
l.sort()
# print(l)
l_sum = 0
for i in range(n-1):
	l_sum += l[i]
if l[n-1] < l_sum:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L = [int(l) for l in input().split()]
l_mx = max(L)
L.remove(l_mx)
if sum(L) <= l_mx:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

longest = max(l)
calc = sum(l) - longest

if calc > longest:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Solution code:
n=int(input())
l=list(map(int,input().split()))
maxl=l.pop(l.index(max(l)))
other=0
for i in l:
    other=other+i
if maxl>=other:
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
import numpy as np

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

i = np.argmax(L)

if L[i] < sum(L) - L[i]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
x = int(input())
y = input()
y2 = y.split(" ")
max = 0
sum = 0
for i in range(x):
    if(max < int(y2[i])):
        max = int(y2[i])
    sum += int(y2[i])

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

Submission status: Accepted

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

max = my_list.pop()
print("Yes" if max < sum(my_list) else "No")

Submission status: Accepted

Solution code:
Q = int(input())
N = list(map(int, input().split()))
max_N = max(N)

if max_N < sum(N)-max_N :
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

l_list

goukei = sum(l_list)
max_l = max(l_list)

if max_l < goukei - max_l:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
l = max(L)
L.remove(l)
result = 0
sum = 0

for i in L:
    sum += i
if l < sum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
maxNum = l.pop(l.index(max(l)))
total = 0
for i in l:
    total += i
if maxNum < total:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int, L: "List[int]"):
    S = sum(L)
    M = max(L)

    if M < (S-M):
        print(YES)
    else:
        print(NO)


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    L = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, L)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
# b = list(map(lambda x: math.ceil(x/10)*10, a))


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

Submission status: Accepted

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

Submission status: Accepted

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

l.sort(reverse=True)

if (l[0] < sum(l[1:])):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

s = sum(L)
print("Yes" if all(s-li > li for li in L) else "No")

Submission status: Accepted

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

def main():
    l = sorted(L)
    print('Yes' if sum(l[:-1]) > l[-1] else 'No')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from __future__ import print_function
import numpy as np
import sys
import math,string,itertools,fractions,heapq,collections,re,array,bisect,copy,functools
# from itertools import accumulate
# from collections import deque
import random

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)

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

# eprint(2*l.max())
# eprint(l.sum())
if 2*l.max()<l.sum():
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

n = input()
arr = sorted(map(int, input().split()))

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

Submission status: Accepted

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