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:
size = int(input())
sides = [int(x) for x in input().split()]
sides.sort()
big = sides[-1]
smalls = sum(sides) - big
if smalls > big:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
sides = []
sides2 = input()
sides2 = sides2.split()
for i in sides2:
  sides.append(int(i))
maxim = max(sides)
if maxim>=sum(sides)-maxim:
  print("No")
else:
  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:
N = int(input())
L = list(map(int,input().split()))
sL = sum(L)
for i in range(N):
    if sL-L[i] <= L[i]:
        print("No")
        exit()
print("Yes")

Submission status: Accepted

Solution code:
# ABC117B - Polygon
def main():
    N, *L = map(int, open(0).read().split())
    L.sort()
    flg = sum(L[:-1]) > L[-1]
    print("Yes" if flg else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
lis = tuple(map(int, input().split()))
bl = sum(lis) - max(lis) * 2 > 0
print('Yes' if bl 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()))
if 2*max(l)<sum(l):
  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()))
if max(L) < sum(L) - max(L):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

def main():
    N = int(input())
    L =  [int(s) for s in input().split()]
    most_long = 0
    other_longs = 0
    for l in L:
        if(l>most_long):
            other_longs += most_long
            most_long = l
        else:
            other_longs += l
    if(other_longs>most_long):
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
total = 0
answer = "Yes"
for i in L:
    total += i
for i in L:
    if i < total - i:
        continue
    else:
        answer = "No"
        break
print(answer)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    L =  [int(s) for s in input().split()]
    most_long = 0
    other_longs = 0
    for l in L:
        if(l>most_long):
            other_longs += most_long
            most_long = l
        else:
            other_longs += l
    if(other_longs>most_long):
        print('Yes')
    else:
        print('No')



if __name__ == "__main__":
    main()

Submission status: Accepted

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

if L[-1] < sum(L[:-1]):
    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)>0 else "No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

if sum(a)-max(a)*2 > 0:
    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):
    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, *l = map(int, open(0).read().split())

max = 0
total = 0
for i in range(0, n):
    if l[i] > max:
        total += max
        max = l[i]
    else:
        total += l[i]

if max >= total:
    print('No')
else:
    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:
N = int(input())
l = [int(x) for x in input().split()]
print("Yes") if max(l) < sum(l) - max(l) else print("No")

Submission status: Accepted

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

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

m = max(L)
L.remove(m)

print("Yes" if sum(L) > m else "No")

Submission status: Accepted

Solution code:
N=input()
L=list(map(int,input().split()))
s=0
for i in L:
  s+=i
if 2*max(L)<s:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

max_l = max(l_list)
t = sum(l_list) - max_l
ans = "Yes" if max_l < t else "No"

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve():
    m = max(li)
    li.remove(m)
    if (m < sum(li)):
        print('Yes')
    else:
        print('No')


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

solve()

Submission status: Accepted

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

A = L[0]
B = sum(L) - A

if B > A:
    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]"):
    m = max(L)
    print(YES if m < sum(L) - m else NO)
    return


# Generated by 1.1.5 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 = list(map(int, input().split()))

lmax = max(l)
lsum = sum(l)

if lmax < lsum-lmax :
  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()))
print('Yes' if 2*max(l)<sum(l) else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
corners = int(input())
sides = list(map(int, input().split()))
re_sides = sorted(sides, reverse=True)
nums = 0
for i in range(corners-1):
    nums += re_sides[i+1]
if nums > re_sides[0]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_ = input()
cand_list = list(map(int, input().split()))
max_val = max(cand_list)
print('Yes' if sum(cand_list) > 2*max_val else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

L = sorted(L, reverse = True)

max = L[0]
apart_sum = 0

for i in range(1,n):
  apart_sum += L[i]
  
if max < apart_sum:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *
# from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    l = list(map(int, input().rstrip('\n').split()))
    l.sort()
    t = 0
    for i in range(len(l)-1):
        t += l[i]
    print("Yes" if t > l[-1] else "No")


if __name__ == '__main__':
    slove()

Submission status: Accepted

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


def main():
    N = int(input())
    L = list(map(int, input().split()))
    L.sort(reverse=True)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
n=int(input())
l=list(map(int,input().split()))

ls=sorted(l)[::-1]

if ls[0]<sum(ls)-ls[0]:
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
longest = 0
s = 0
for a in l:
  s += a
  longest = max(a, longest)
  
if longest < s - longest:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
ls=[int(s) for s in input().split()]
M=max(ls)
ls.remove(M)
if M<sum(ls):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import functools

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
sort_l = sorted(l)
a = sort_l[n-1]
b = sort_l[0:n-1]


if a >= sum(b):
  print("No")
else:
  print("Yes")

Submission status: Accepted

Solution code:
n = int(input())
l =[int(i) for i in 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()))
L.sort()
if sum(L[:-1]) > L[-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())

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

l.sort()

max_l = l.pop()

if max_l < sum(l):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

t=0
for i in range(n-1):
  t += l[i]
print('Yes' if l[n-1] < t else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
leng = list(map(int, input().split()))
leng.sort()
if leng[-1] < sum(leng[0: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:
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(' ')))
max_L = L.pop(L.index(max(L)))
if max_L < sum(L):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = input()

l = map(int, raw_input().split())

# 最大値を調べループ
maxVal = 0
maxID = 0
for i in range(n):
    if l[i] >= maxVal:
        maxVal = l[i]
        maxID = i

# 最大数以外の総和を求めループ
sum = 0
for i in range(n):
    if i != maxID:
        sum += l[i]

if maxVal < sum:
    print "Yes"
else:
    print "No"

Submission status: Accepted

Solution code:
#2019/09/26
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()))
if 2 * max(l) < sum(l):
  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:
input()
l=list(map(int,input().split()))
m=max(l)
print('Yes' if m*2<sum(l) 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())
s = input()
a = s.split(' ')
for i in range(n):
    a[i] = int(a[i])
max = 0
tot = 0
for i in range(n):
    if a[i] > max:
        max = a[i]
    tot +=a[i]
if max < tot - max: print('Yes')
else: print('No')

Submission status: Accepted

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

longest = max(l_list)
l_list.remove(longest)

if longest < sum(l_list):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
all=0
mx=0
for i in range(len(a)):
	x=int(a[i])
	if x>mx: 
		mx=x
	all=all+x
if all>2*mx : 
	print("Yes")
else : 
	print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n=int(input())  #数値入力 「N」だけの入力のとき
L=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

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

Submission status: Accepted

Solution code:
n = raw_input()
L = map(int, raw_input().strip().split())
s = sum(L)
mx = max(L)
if mx < s - mx:
  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(""))
x = list(map(int, input().split()))
if((sum(x)-max(x))>max(x)):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())

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

max_l = max(l)
l.remove(max_l)
if 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()]
lmax = max(l)
lsum = sum(l)
ll = lsum - lmax
if lmax < ll:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num = int(input())
list1 = [int(i) for i in input().split()]
sum1 = sum(list1)
flag = True
for x in range (num):
    if list1[x]>=(sum1-list1[x]):
        flag = False
        break

if flag == True:
    print ("Yes")
else:
    print ("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

sl = sorted(l)

if sl[-1] < sum(sl[:-1]):
    print('Yes')
else:
    print('No')

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

lmax=max(L)
lothers=sum(L)-lmax

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

Submission status: Accepted

Solution code:
N = int(input())
L = sorted(map(int, input().split()))[::-1]

max_l = L[0]

sum = 0
for i in range(1,N):
    sum += L[i]


print('Yes' if max_l < sum else 'No')

Submission status: Accepted

Solution code:
n = int(input())
*l_list, longest = sorted(map(int, input().split()))
print('Yes' if longest < sum(l_list) 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())
p=list(map(int,input().split()))
m=max(p)
p.remove(m)
#print(p)
if m<sum(p):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
print('YNeos'[sum(l)-max(l)<=max(l)::2])

Submission status: Accepted

Solution code:
# ABC117b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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()))
L_sum = sum(a for a in L)
if all((L[i] < L_sum-L[i] for i in range(n))):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n= int(input())
l = [int(x) for x in 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()))
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)
sum = 0
for i in range(1, N):
    sum += L[i]
if L[0] < sum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

L.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum_length = 0
max_index = l.index(max(l))
for i in range(n):
    if i == max_index:
        continue
    sum_length += l[i]
if sum_length > l[max_index]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

longest = max(l)
#print(longest)
l.remove(longest)
#print(l)

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
s = sum(l)
ans = "Yes"
for i in range(n):
    if l[i] >= s/2:
        ans = "No"
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

L.sort()
hen = L.pop(-1)

if hen < sum(L):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
I = list(map(int,input().split()))
I.sort(reverse = True)
count = 0
ans = I[0]
del I[0]
if ans < sum(I):
    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 = [int(x) for x in 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()))
s=sum(L)

sw=0
for i in range(N):
  if s-L[i]<=L[i]:
    sw=1
    break
print("Yes" if sw==0 else "No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    L = list(map(int, input().split()))
    S = sum(L)
    flag = True
    for l in L:
        if l >= S - l:
            flag = False
    if flag:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n=int(input())
l=list(map(int,input().split()))
l.sort()
maxl=l.pop()
a=sum(l)
print('Yes' if maxl<a else 'No')

Submission status: Accepted

Solution code:
def MAP(): return list(map(int,input().split()))

n = int(input())
l = MAP()

m = max(l)
l.remove(m)
if m<sum(l):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
max = 0
sum = 0
for i in range(len(l)):
    sum += l[i]
    if l[i] > max:
        max = l[i]
    
if sum - max > max:
    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:
_=input()
a= sorted(list(map(int,input().split())),reverse=True)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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


L.sort()


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

Submission status: Accepted

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

mx = max(ls)
sm = sum(ls)

smt = sm - mx

if smt > mx:
    print('Yes')
else:
  print('No')

Submission status: Accepted

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

count=0
for i in range(n):
  count+=l[i]

ans=0
for j in range(n):
  if count>2*l[j]:
    ans+=1

if ans==n:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def ok():
  print("Yes")
def ng():
  print("No")

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

if l[0] < sum(l[1::]):
  ok()
else:
  ng()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import sys

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)
L.remove(M)
i = 0
for j in L:
    i += j
if i > M:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
ls = sorted(map(int, input().split()))
s = sum(ls[:-1])
if s > ls[-1]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = sorted(s)
c = s.pop(n-1)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if max(L) * 2 < sum(L):
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Accepted

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