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

Submission status: Accepted

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

maxl = max(l)

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

Submission status: Accepted

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

total = sum(l[:n - 1])

if total > l[n - 1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

mx = max(L)
L.pop(L.index(mx))

print('Yes' if mx < sum(L) else '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:
n = int(input())
l = [int(i) for i in input().split()]
a = 0
for i in range(n):
    if l[i] < sum([l[j] for j in range(n) if i!=j]):
        a += 1
if a == n:
    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 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()))

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

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
L = sorted(iil())

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    L = int(input())
    array = list(map(int, input().split()))
    curr_sum = array[0]
    max_v = curr_sum
    for num in array[1:]:
        curr_sum += num
        max_v = max(max_v, num)
    if max_v < curr_sum - max_v:
        print('Yes')
    else:
        print('No')

resolve()

Submission status: Accepted

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

Submission status: Accepted

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

sm = sum(L)
mx = max(L)

if mx < sm - mx:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

main()

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())
string = input()
l = []
for i in range(n):
    l.append(int(string.split()[i]))

maxl = 0
for i in range(n):
    if l[i] > maxl:
        maxl = l[i]
if sum(l) > 2 * maxl:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N =int(input())
L = [ int(i) for i in input().split()]
L = sorted(L)
s = sum(L[:N-1])
if s > (L[N-1]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
max_Lindex=L.index(max(L))
max_L=L[max_Lindex]
L.pop(max_Lindex)
sum_L=sum(L)
if sum_L>max_L:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

maxL = max(L)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    s=LIST()
    s.sort()
    a=s.pop(-1)
    if sum(s)>a:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

Submission status: Accepted

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

li2 =sorted(li)

if li2[N-1]<sum(li2[0:N-1]):
    print("Yes")
elif li2[N-1]>=sum(li2[0:N-1]):
    print("No")

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
INF = 10**10
MOD = 10**9 + 7
sys.setrecursionlimit(100000000)
from functools import lru_cache
from itertools import permutations

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

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=list(map(int,input().split()))
if max(b)<sum(b)-max(b):
    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:
def main():
    n = int(input())
    num_list = list(map(int, input().split()))

    max_num = max(num_list)

    num_list.remove(max_num)

    sum_list = sum(num_list)

    if sum_list > max_num:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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=[int(i) for i in input().split()]
long=max(L)
#print(long)
L.remove(long)
if long<sum(L):
  #print(sum(L))
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

last = l[-1]
total = sum(l[:-1])

if total>last:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

list_L.sort()
if max(list_L) < sum(list_L[:n-1]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
List = [int(i) for i in input().split(" ")]
Max = max(List)
l = -Max
for i in range(N):
    l+=List[i]

if Max<l:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int,input().split()))
a=sorted(a,reverse=True)
x=a[0]
y=sum(a[1:])
print('Yes' if x<y else '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 = int(input())
L = list(map(int, input().split()))
s = sum(L)
flag = True
for x in L:
    if 2*x < s:
        continue
    else:
        flag = False
        break
if flag:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    L = [int(l) for l in input().split()]
    L.sort()
    lsum = sum(L[:N-1])
    if L[N-1] < lsum: print("Yes")
    else: print("No")

    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
L = LIST()
m = max(L)
for i in range(N):
    a = L[i]
    # b = L[:i-1] + L[i:]
    # print(L[:i-1] + L[i:])
    if a == m:
        if sum(L)-a > a:
            print("Yes")
            break
        else:
            print("No")
            break

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
argVec = sys.argv
if len(argVec) > 1:
    GBN_DEBUG = True
else:
    GBN_DEBUG = False

#S = input()
N = int(input())
#S, T = input().split() 
#N, M = map(int, input().split()) 
#W = [input() for _ in range(N)]
A = list(map(int, input().split()))

def dprn(s, i):
    if GBN_DEBUG:
        print(", " + s + " = " + str(i), end = "")

def dprns(s):
    if GBN_DEBUG:
        print(", " + s, end = "")

def dprni(i):
    if GBN_DEBUG:
        print(str(i), end=" ")

def puts(s):
    print(s)

def puti(i):
    print(str(i))

A.sort(reverse = 1)

if sum(A) - A[0] > A[0]:
    puts('Yes')
else:
    puts('No')

Submission status: Accepted

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

Submission status: 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:
# https://atcoder.jp/contests/abc117/tasks/abc117_b

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

l.sort()
if l[-1] < sum(l) - l[-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:
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, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

n = INT()
l = LIST()
l.sort()
if l[-1] < sum(l) - l[-1]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    L = [int(i) for i in input().split()]
    sumL = sum(L)
    maxL = max(L)
    print("Yes" if maxL < sumL - maxL else "No")


if __name__ == '__main__':
    main()

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 = 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()))
a = max(L)
b = sum(L)-a
if a < b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

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

A = list(L)
A.sort()

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
L.sort()
s = sum(L) - L[-1]
if L[-1] < s:
    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()))

L=sorted(L)
sum=0
base=max(L)

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

if sum>base:
    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]) < 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())
l = list(map(int, 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()))
l.sort()
cnt = 0
for i in l[:n - 1]:
    cnt += i
    #print(i)
if cnt > l[n - 1]:
    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:
_ = input()
L = sorted(list(map(int,input().split())))
print("YNeos"[sum(L[:-1]) <= 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())
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())
ls = list(map(int,input().split()))
if n < 3:
    print("No")
elif 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()))
maxnum = max(L)
L.pop(L.index(max(L)))
if maxnum < sum(L):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

    long_edge = max(ls)
    ls.remove(long_edge)
    if long_edge < sum(ls):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x = int(input())
y = sorted(list(map(int,input().split())))
l = 0
for i in range(x-1):
  l += y[i]
#print(l)
if y[x-1] < l:
  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:
a=int(input())
b=list(map(int,input().split()))

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

Submission status: Accepted

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

l.sort()
print('Yes') if l.pop() < sum(l) 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())
ls = [int(i) for i in input().split()]

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

Submission status: Accepted

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

p,q = max(a), sum(a) - max(a)
if p < q:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

L.sort(reverse=True)
longest = L[0]
others = sum(L[1:])
if longest < others:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
input()
l=sorted(map(int,input().split()))[::-1]
print("Yes" if l[0]<sum(l[1:]) 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:
d=map(int,input().split(" "))
abm=list(map(int,input().split(" ")))
max_hen=max(abm)
#print(sum(abm))
l=sum(abm)-max_hen*2
if l>0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
#import sys
#import math
#import numpy as np

'''a,b= map(int,input().split())'''
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
#n,l= map(int, input().split())
#x = [list(map(int, input().split())) for _ in range(n)] 
a=int(input())
li=[int(x) for x in input().split()]
ans=ju=0
for i in range(a):
  ju=max(ju,li[i])
ans=sum(li)-ju
if ans-ju>0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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:
#ABC117

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(' ')))
L.sort(reverse=True)
if sum(L[1:]) > L[0]:
  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())

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(e) for e in input().split()]

ans ='No' if max(a)>= sum([e for e in a])-max(a) else 'Yes'
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Ls = sorted(Ls)

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

Submission status: Accepted

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

L = max(l)
l.pop(l.index(L))
if sum(l) > L:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
L = sorted([int(x) for x in 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()))
m = max(l)
l.remove(max(l))
if m < sum(l):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
X=list(map(int,input().split()))
A=int(max(X))
B=int(sum(X))
if int(B-A)>A:
    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:
N=int(input())
A=list(map(int,input().split()))
L=sorted(A,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()))

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

Submission status: Accepted

Solution code:
n=int(input())
line = list(map(int,input().split()))
line.sort()
line.reverse()
s=0
for i in range(n-1):
  s += line[i+1]
if line[0] < s:
  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()

s = sum(l[:-1])

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
M = max(L)
ind = L.index(M)
del L[ind]

s = sum(L)

if M < s: 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=list(map(int,input().split()))
sort_l=sorted(l,reverse=True)
longest=sort_l[0]

del sort_l[0]

if sum(sort_l) > longest:
    print('Yes')
else:
    print('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()))

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

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:
n = int(input())
li = list(map(int, input().split()))
l_max = max(li)
if sum(li) > 2*l_max:
  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:
# -*- coding: utf-8 -*-

N = int(input().strip())
L_list=[int(i) for i in input().rstrip().split()]
#-----

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
suml = sum(l)
maxl = max(l)
lestl = suml-maxl
if maxl<lestl:
    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(i) for i in input().split()]

l.sort(reverse=True)

max = l[0]
els = sum(l[1:])

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if l[0]<sum(i for i in l[1::]):
  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=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:
n = int(input())
l = list(map(int,input().split()))
l.sort(reverse=True)
x = l[0]
y = sum(l[1:])

if x < y:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())

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

total = sum(t)

for i in range(n):
    if total-t[i] <= t[i]:
        print('No')
        exit()
print('Yes')

Submission status: Accepted

Solution code:
n = int(input())
L = list(map(int, input().split()))
t = max(L)
L.remove(t)
if t < sum(L):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) - L[0]:
  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:
#117_B
N=int(input())
L=list(map(int,input().split()))
print('Yes' if 2*max(L)<sum(L) else 'No')