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

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

Submission status: Accepted

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

Submission status: Accepted

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

Solution code:
N=int(input())
L=list(map(int,input().split()))
max1=max(L)
b=sum(L)
if 2*max1>=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 sum(L) - max(L) > max(L) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
n = map(float, raw_input().split())
l = map(float, raw_input().split())
x = sum(l)-2*max(l)
if x>0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Solution code:
# import bisect
# import heapq
# import math
# import random
# from collections import Counter, defaultdict, deque
# from decimal import Decimal
# from functools import lru_cache, reduce
# from itertools import combinations, combinations_with_replacement, product, permutations
# from operator import add, mul, sub, itemgetter
# import numpy as np

import sys
sys.setrecursionlimit(10000)

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

def mt(f):
	import time
	def wrap(*args, **kwargs):
		s = time.time()
		ret = f(*args, **kwargs)
		e = time.time()
		error_print(e - s, 'sec')
		return ret
	return wrap

def read_int(input=None):
	if input == None:
		input = sys.stdin.readline().strip()
	ret = [int(x) for x in input.split()]
	if len(ret) == 1:
		ret = ret[0]
	return ret

def read_float(input):
	if input == None:
		input = sys.stdin.readline().strip()
	ret = [float(x) for x in input.split()]
	if len(ret) == 1:
		ret = ret[0]
	return ret
	
def read_str(input):
	if input == None:
		input = sys.stdin.readline().strip()
	ret = [x for x in input.split()]
	if len(ret) == 1:
		ret = ret[0]
	return ret
		
@mt
def slv(*args): 
	# 処理
	# ここから
	
	if max(L) < sum(L) - max(L):
		ans = 'Yes'
	else:
		ans = 'No'
	
	# ここまで
	return ans

if __name__ == '__main__':
	
	# テスト用入力
	t = '''4
3 8 5 1'''.splitlines()
	
	# 入力 (変数= read_xxx(test[行数]))
	# ここから
	
	N = read_int()
	L = read_int()
	
	# ここまで
		
	# 出力
	# ここから
	
	print(slv(N, L))
	
	# ここまで

Submission status: Accepted

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

lsmax = max(ls)
ls.remove(lsmax)

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

Submission status: Accepted

Solution code:
a = int(input())
L = list(map(int, input().split()))
ld = sorted(L, reverse=True)
max = ld[0]
ld.pop(0)
sum = sum(ld)

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

Submission status: Accepted

Solution code:
N = int(input())
LS = [int(i) for i in input().split()]
m = max(LS)
o = sum(LS) - m

if m < o:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

l_max = max(ls)
l_sum = sum(ls)

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

Submission status: Accepted

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

if max(li_l) < sum(li_l) - max(li_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) > max(l):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
L = input()
L = L.split()
sum_N = 0
max_N = 0
for i, val in enumerate(L):
    L[i] = int(val)
    sum_N += L[i]
    if L[i] > max_N:
        max_N = L[i]
if max_N >= (sum_N - max_N):
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
T = list(map(int, input().split()))
M=max(T)
T.remove(M)
S=sum(T)
if M<S:
	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 = []
l = list(map(int,input().split()))
sum = 0

l.sort(reverse=True)
for index,item in enumerate(l):
    if(index!=0):
        sum += item

if l[0] < sum:
    print("Yes",end="")
else:
    print("No",end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
L = map(int, input().split())
sumL = 0
maxL = -1
for Li in L:
    sumL += Li
    if Li > maxL:
        maxL = Li
    
sumL -= maxL

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

Submission status: Accepted

Solution code:
kaku = input()
s_list = input().split(' ')
if not int(kaku) == len(s_list):
    print('No')
else:
    hen_list = [int(x) for x in s_list]
    m = max(hen_list)
    total = sum(hen_list)
    if m < total - m:
            print('Yes')
    else:
        print('No')

Submission status: Accepted

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

l.sort()

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

Submission status: Accepted

Solution code:
n = input()
L = list(map(int, input().split()))
sum_l = 0
for sl in L:
  sum_l += sl
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()))

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

Submission status: Accepted

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


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

maxL = max(L)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
Sum=0
Max=0
n=int(input())
a=input().split()
for i in range(n):
    a[i]=int(a[i])
    Sum+=a[i]
    Max=max(Max,a[i])
if Max<Sum/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 = input()
l_ls = sorted(list(map(int, input().split())))
if l_ls[-1] < sum(l_ls[:-1]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:

try:
    N = int(input())
    Li = [int(x) for x in input().split()]
    Li = sorted(Li, reverse=True)
    if N < 3 or N > 10:
        exit()
    for x in Li:
        if x < 1 or x > 100:
            exit()
    if N is not len(Li):
        exit()
    maxL = Li[0]
    a = 0

    for i in range(1, N):
        a += Li[i]
    if maxL < a:
        print("Yes")
    elif maxL >= a:
        print("No")
except ValueError:
    exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
length = list(map(int, input().split()))
lengthsum = sum(length)
ans = "Yes"
for l in length:
    if l >= lengthsum - l:
        ans = "No"
        break
print(ans)

Submission status: Accepted

Solution code:
a,b=int(input()), sorted([int(x) for x in input().split()],reverse=1)
print("Yes" if b[0]<sum(b[1:a]) 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 = input()
m = list(map(int,input().split()))
m.sort()
if m[-1] < sum(m) - m[-1]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  # N_max < sum(not N_max)
  N = int(input())
  Ls = map(int, input().split())

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



main()

Submission status: Accepted

Solution code:
input();s=map(int,raw_input().split());print'YNeos'[sum(s)-max(s)*2<1::2]

Submission status: Accepted

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

nums = list(map(lambda x: int(x), L))

nums.sort()

max = nums.pop(-1)

sum = sum(nums)

if max < 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) - L[-1] > L[-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# Polygon

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

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

Submission status: Accepted

Solution code:
n = input()

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = input().split()
i = 0
while i < n:
  a[i] = int(a[i])
  i = i + 1 
 
i = 0
while i < n:
  j = i + 1
  while j < n:
    if a[i] < a[j]:
      temp = a[i]
      a[i] = a[j]
      a[j] = temp
    j = j + 1
  i = i + 1
 
sums = sum(a)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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:
a = input()
li = list(map(int, input().split()))
li.sort()
M = li[-1]
hoka = sum(li[:-1])

if M < hoka:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

B = sum(A) - (max(A) * 2)

if(B > 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

N = int(sys.stdin.readline().strip())

line = sys.stdin.readline()
nums = [int(x) for x in line.strip().split(' ')]

assert N == len(nums)
nums.sort()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

sumdatas = sum(datas)
maxdatas = max(datas)

if maxdatas < sumdatas - maxdatas:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

L_max = L[-1]
L_sum = sum(L) - L_max

if L_max < L_sum:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())
hoge=list(map(int,input().split()))
hoge.sort()
if(sum(hoge)-2*hoge[-1]>0):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from functools import reduce
from operator import add

N = input()

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

MAX = max(L)

if reduce(add, L) - 2 * MAX > 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

L.sort(reverse=True)

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

Submission status: Accepted

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

s = sum(inp)-max(inp)
m = max(inp)

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

Submission status: Accepted

Solution code:
n=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()))
max_L = L.pop(L.index(max(L)))
if max_L < sum(L):
    ans = True
else:
    ans = False
if ans:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

maximum = max(LN)
ans = 'Yes' if maximum < sum(LN) - maximum else 'No'
print(ans)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    L = [int(i) for i in input().split()]
    L_max = max(L)
    if L_max < sum(L) - L_max:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
L = input().split()
L = np.array([int(l) for l in L])

l_max = np.max(L)
l_i_max = np.argmax(L)
sum = 0

for i, l in enumerate(L):
  if i == l_i_max:
    continue
  sum += l

if l_max < sum:
  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[0:-1]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
m=max(l)
n=sum(l)-m
if m<n: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)

if(sum(L_list)>L_max):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n = I()
    l = LI()
    m = max(l)
    s = sum(l)
    if m * 2 < s:
        return 'Yes'

    return 'No'



print(main())

Submission status: Accepted

Solution code:
import sys
n= int(input())
l = sorted(list(map(int, input().split())))
s = sum(l)

for x in l:
  if x>=s-x:
    print("No")
    sys.exit()
print("Yes")

Submission status: Accepted

Solution code:
if __name__ == '__main__':
  n = int(input())
  L = list(map(int, input().split()))
  m = max(L)
  s = sum(L)
  if 2*m - s < 0:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

def main():
  input = sys.stdin.readline
  n = int(input())
  l = [int(a) for a in input().split()]
  m = max(l)
  s = sum(l) - m
  if s > m:
    print('Yes')
  else:
    print('No')


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
# import numpy as np

s_in = lambda: stdin.readline()[:-1]  # s = s_in()
d_in = lambda: int(stdin.readline())  # N = d_in()
ds_in = lambda: list(map(int, stdin.readline().split()))  # List = ds_in()


N = d_in()
L_list = ds_in()

S = sum(L_list)
if max(L_list) * 2 < S:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
nums = list(map(int, input().split()))
mx = nums.pop(nums.index(max(nums)))
if mx < sum(nums):
  print("Yes")
else :
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
el = list(map(int, input().split()))
el.sort(reverse=True)
mle = el[0]
els = sum(el) - mle
print("Yes") if mle < els else print("No")

Submission status: Accepted

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

tst=lambda x:x*2<s
print('Yes' if all(list(map(tst,a))) else 'No')

Submission status: Accepted

Solution code:
#abc117b

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

Submission status: Accepted

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

lines=0
L.sort()
for i in range(len(L)-1):
    lines+=L[i]

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

Submission status: Accepted

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

n = len(l)

lm = 0
ls = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]
  ls = ls + l[i]
ls = ls - lm

if lm < ls:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
L = list(map(int,input().split()))
L.sort()
largest = L.pop()
if largest < sum(L):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Ls.sort()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding:utf-8 -*-

def main():
  x = int(input())
  ls = list(map(int, input().split()))
  ls.sort()
  if ls[-1] < sum(ls[:-1]):
    print('Yes')
  else:
    print('No')
  pass

if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
print((lambda l:['No','Yes'][sum(l[:-1])>l[-1]])(sorted(list(map(int,[input()]+input().split()))[1:])))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
_,*s=map(int,open(0).read().split());print('YNeos'[sum(s)-max(s)*2<1::2])

Submission status: Accepted

Solution code:
input();*s,=map(int,input().split());print('YNeos'[sum(s)-max(s)*2<1::2])

Submission status: Accepted

Solution code:
n = int(input())
l = sorted([i for i in map(int, input().split())])
print("YNeos"[l[-1] >= sum(l[:-1])::2])

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

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

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

Submission status: Accepted

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

L.sort()

s = sum(L)

print("Yes" if s - 2 * L[-1] > 0 else "No")

Submission status: Accepted

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

max_length = max(L)
other_length = sum(L) - max_length

if max_length < other_length:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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


def main() -> None:
    L.sort()
    longest = L.pop()
    if longest < sum(L):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
lines = list(map(int,input().split()))
max_line_idx = lines.index(max(lines))
max_line = max(lines)
lines.pop(max_line_idx)
if sum(lines) > max_line:
    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)/2:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = 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 = [int(i) for i in input().split()]
L = sorted(L)
if L[-1] < sum(L[:-1]):
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

n=int(input())

x=[int(i) for i in input().split()]
x.sort()
if sum(x) > 2*x[-1]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  N = int(input())
  len_list = sorted(list(map(int, input().split())), reverse=True)
  max_len = len_list[0]
  sum_len = 0
  
  for i in range(1,N):
    sum_len += len_list[i]
    
  if max_len < sum_len:
    print('Yes')
  else:
    print('No')

main()