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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int,input().split()))
M = L.index(max((L)))
if L.pop(M) < sum(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(sorted(l, reverse=True)[1:]) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

l_max = max(lines)
ind_l_max = lines.index(l_max)
del lines[ind_l_max]

sum_remain = 0
for i in range(n-1):
    sum_remain += lines[i]

if l_max < sum_remain:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

l_max=max(l)
res=sum(l)-l_max

print('Yes' if res>l_max else 'No')

Submission status: Accepted

Solution code:
def iread():
    return int(input())


def sread():
    return input()


def aread_int():
    tmp = input().split()
    ret = [int(i) for i in tmp]
    return ret


def aread_str():
    return input().split()


if __name__ == '__main__':
    n = iread()
    a = aread_int()
    s = sum(a)
    m = max(a)
    if m < s - 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 = map(int, input().split())

sort_l = sorted(l, reverse=True)

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

Submission status: Accepted

Solution code:
"""
# 標準入力取得
## 文字列
 = sys.stdin.readline().rstrip()
 = list(sys.stdin.readline().rstrip())

## 数値
 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]
"""

import math
import sys
import itertools
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

mod = 1000000007

if __name__ == "__main__":
    n= int(sys.stdin.readline())
    l= list(map(int, sys.stdin.readline().split()))
    l.sort(reverse=True)
    if l[0] < sum(l[1:n]):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

ans = "Yes"
for i in range(len(l)):
    s = 0
    for j in range(len(l)):
        if not j == i:
            s += l[j]
    if l[i] >= s:
        ans = "No"
        break
print(ans)

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())
lll = list(map(int, input().split()))
lll.sort(reverse=True)
if lll[0] < sum(lll[1:]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
numN = int(input())
args = input()
 
lines = list()
 
 
for i in range(numN):
    if i == numN - 1 :
        lines.append(int(args))
        break

    lines.append(int(args[0:args.find(" ")]))
    args = args[args.find(" ") + 1 :]
 
list_sorted = sorted(lines, reverse = True)
max_line = list_sorted[0]
 
for m in range(numN - 1):
    max_line = max_line - list_sorted[m+1]

if max_line < 0 :
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

lis.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

max = max(l)
sum = sum(l)

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

Submission status: Accepted

Solution code:
N = 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())
num_list = list(map(int, input().split()))

max_val = max(num_list)
sum_except_max = sum(num_list) - max_val

if (max_val < sum_except_max):
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
N = int(input())
List = [int(l) for l in input().split()]

s = sum(List)
l_max = max(List)
if l_max < s-l_max:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
X = sorted(list(map(int, input().split())))
sum1 = sum(X) - X[-1]

if X[-1] < sum1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import io, sys

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

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

Submission status: Accepted

Solution code:
import numpy as np
def q52(n, l):
    maxarg = np.argmax(l)
    m = max(l)
    del l[maxarg]
    if m < sum(l):
        return 'Yes'
    else:
        return 'No'

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

Submission status: Accepted

Solution code:
n,*a,=map(int,open(0).read().split());print("YNeos"[sum(a)<=max(a)*2::2])

Submission status: Accepted

Solution code:
n,*a,=map(int,open(0).read().split());a.sort();print("YNeos"[sum(a[:-1])<=a[-1]::2])

Submission status: Accepted

Solution code:
# ABC 117, B - polygon
n = int(input())
L = [int(el) for el in input().split(' ')]

max_l = max(L)
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()))
s = sum(l)

for i in range(n):
    if s <= 2*l[i]:
        print('No')
        exit()
print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = 0
maxL = 0

for i in range(N):
    if L[i] > maxL:
        maxL = L[i]
       
    
    s = s+L[i]


if s-maxL  > maxL:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

L.sort()
s = 0

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

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

Submission status: Accepted

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

maxi = L.index(max(L))
s = 0

for i in range(N):
    s = s+L[i]

if s - L[maxi] > L[maxi]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

check = 0

for i in range(N):
    L_tmp = L[i]
    L_sum_tmp = sum(L) - L_tmp
    if L_sum_tmp <= L_tmp:
        check = 1

if check == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

a = max(l)

s = sum(l) - a

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
l=list(map(int,input().split()))
x=max(l)
y=sum(l)

if x<(y-x):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int, input().split()))
b = sorted(b, reverse=True)
if sum(b) - b[0] > b[0]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 117 B

N = int(input())

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

m = max(l)
del l[l.index(max(l))]

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

Submission status: Accepted

Solution code:
num = int(input())
hen = list(map(int, input().split()))
hen.sort(reverse=True)
long = hen[0]
hen = hen[1:]
if sum(hen) > long:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

sum = int(0)
a = max(L)

for i in range(n):
  sum += L[i]
  
if 2*a < sum:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def main():
    N = int(input())
    L = [int(i) for i in input().split()]
    largest = max(L)

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



if __name__== "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

max_L = max(L)

L.pop(L.index(max_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()))
suml = sum(l)
maxl = max(l)
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()))
T=0
for i in range(N):
  T+=L[i]  
if max(L)<T-max(L):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
n = int(input())
b = list(map(int, input().rstrip().split()))
c = max(b)
d = 0
for i in b:
  d +=i
d -= c
if c < d:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a.sort()
if a[-1] < sum(a[:n-1]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
MAX, SUM=0,0
for i in range(N): #4個分
  if MAX<L[i]:
    MAX=L[i]
for i in range(N):
  SUM=SUM+L[i]
if MAX>=SUM-MAX:
  print('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
N = int(input())
li = list(map(int,input().split()))
Ma = max(li)
li.remove(Ma)
if Ma >= sum(li):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:
N = int(input())
l = [int(x) for x in input().split()]
s = sum(l)
# print(l, s)
for i in range(N):
    if s - l[i] <= l[i]:
        print("No")
        exit()
print("Yes")

Submission status: Accepted

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

if max(li) * 2 < sum(li):
    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()

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

max_ = max(nums)

nums.pop(nums.index(max_))

rest = sum(nums)

if rest > max_:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

for i in range(N):
    a = sum(L) - L[i]
    if a > L[i]:
        cnt += 1
    
if cnt == N:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def gcd(a, b):
    if a == 0:
        return b
    if b == 0:
        return a

    if a > b:
        return gcd(b, a % b)
    else:
        return gcd(a, b % a)


def gcd_multi(nums):
    if len(nums) == 0:
        return 0
    if len(nums) == 1:
        return nums[0]

    ret = gcd(nums.pop(), nums.pop())
    while len(nums) > 0:
        ret = gcd(ret, nums.pop())
    return ret


def solve(inputs):
    sides = string_to_int(inputs[0])
    max_i = -1
    for i, s in enumerate(sides):
        if max_i == -1 or s > sides[max_i]:
            max_i = i
    max_len = sides.pop(max_i)

    return "Yes" if max_len < sum(sides) else "No"


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    input()
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

L.sort(key=lambda x:-x)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

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

for i in range(N):
    total +=A[i]
if max(A)<total-max(A):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

# solve
L.sort()
ans = 'Yes' if L[-1] < sum(L[:-1]) else 'No'

# output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())

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

l.sort()

if np.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 = sorted(L)
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()))

s=sum(l)
m=max(l)
ans='Yes' if s>m*2 else 'No'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
Ls = list(map(int, input().split()))
max_l = max(Ls)
Ls.remove(max_l)
print('Yes' if sum([x for x in Ls]) > max_l else 'No')

Submission status: Accepted

Solution code:
a = int(input())
b = list(map(int,input().split()))
c = sorted(b,reverse=True)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(map(int, input().split()))
m = 0		# 配列内の最大値
s = 0		# 配列の要素の総和
for i in range(N):
    s += L[i]
    if m < L[i]:
        m = L[i]

if s - m > 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) > max(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) > 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
ls = list(map(int, input().split()))
maxNum = max(ls)
ls.pop(ls.index(maxNum))

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

Submission status: Accepted

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

n = int(input())
l = list(map(int,input().split()))
m = max(l)
mi = l.index(m)
sum = 0
for i in range(n):
    if i == mi:
        continue
    sum += l[i]
if sum > m:
    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:n])):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input()
l=[int(i) for i in input().split()]
print(["Yes","No"][max(l)-(sum(l)-max(l))>=0])

Submission status: Accepted

Solution code:
a=int(input())
li = list(map(int,input().split()))
b = int(max(li))
if sum(li)-2*b>0:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

if sum(li[:-1]) > li[-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)
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()))
m = max(l)
l.remove(m)
if m < sum(l):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

lst1.sort(reverse=True)
sum = 0

for i in range(n-1):
    sum+= lst1[i+1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

lmax = max(L)
L.remove(lmax)
lsum = sum(L)

if lmax < lsum:
    print('Yes')
elif lmax >= lsum:
    print('No')

Submission status: Accepted

Solution code:
#n, m = map(int,input().split())
n = int(input())
ls = list(map(int,input().split()))
#ls = [list(map(int,input().split()))[1:] for i in range(n)]
#s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

if mx < S-mx:
    print("Yes")
else:
    print("No")

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

if len(l) < 3:
    print('No')

ma = max(l)

l.remove(ma)

if ma < sum(l):
    print("Yes")

else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
edges.pop(edges.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#2  次元平面上に辺の長さがそれぞれ L1,L2,...,LN の N 角形(凸多角形でなくてもよい)が描けるかを判定してください。
#ここで、次の定理を利用しても構いません。
#定理 : 一番長い辺が他の N−1 辺の長さの合計よりも真に短い場合に限り、条件を満たす N 角形が描ける。

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

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

if sum>L[0]:
    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())
edges = [int(x) for x in input().split()]

longest = max(edges)
total = sum(edges) - longest

if longest < total:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

summation=sum(L)
maximum=max(L)
second=summation-maximum

if maximum<second:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

line.sort(reverse=True)
lmx = line[0]
del line[0]
lsum = sum(line)

if lmx < lsum:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
li = map(int,input().split())
li = list(li)
li.sort()
s=0
for i in range(n-1):
  s+=li[i]
if s<=li[-1]:
  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())
ls = list(map(int, input().split()))
maxl = max(ls)
ls.pop(ls.index(maxl))
if sum(ls) > maxl:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
input()
a=list(map(int,input().split()))
print("YNeos"[max(a)*2>=sum(a)::2])

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))
max = l.pop(l.index(max(l)))
sigma = sum(l)
print('Yes') if max < sigma 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:
import sys
N = int(input())
line = list(map(int, input().split()))

line.sort()
total = 0
for i in line[:-1]:
    total += i
if line[-1] < total:
    print('Yes')
    sys.exit()
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:
import sys
sys.setrecursionlimit(100000)

def intinput(): return map(int,sys.stdin.readline().split())

n=int(input())
l=list(intinput())
l.sort()
if sum(l[:-1])>l[-1]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n1 = int(input())
na2  = [int(i) for i in input().split()]

n3 = max(na2)
n4 = sum(na2)

r5 = "No"
if (n4 - (2 *n3)) > 0:
    r5 = "Yes"

print(r5)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

n = int(input())
length = sorted(list(map(int, input().split())))
a = sum(length[:n-1])

print("Yes") if length[n-1] < a else print("No")

Submission status: Accepted

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

Submission status: Accepted

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

L.sort()
L.reverse()
L_max = L.pop(0)
if L_max < sum(L):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
_ = int(input())
L = sorted(list(map(int, input().split())))
print('NYoe s'[max(L)<sum(L)-max(L)::2])

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