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: Wrong Answer

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

print('Yes' if max(inputs) < sum(inputs) - max(inputs) else 'NO')

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [int(i) for i in input().split()]
m = max(L)
s = 0
i = True
for j in L:
    if m == j and i:
        continue
        i = False
    s += j

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
Llist = [int(x) for x in input().split()]
sortedList = sorted(Llist, reverse=True)
sumL = 0
for x in sortedList:
    if x == sortedList[0]:
        continue
    sumL = sumL + x
if sortedList[0] < sumL:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for i in L:
  if sum(L) - i < i:
    print("No")
    exit()
else:
  print("Yes")

Submission status: Wrong Answer

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


def main():
    """Function."""
    n = int(input())
    ls = list(map(int, input().split()))

    max_val = max(ls)
    flag = 0
    total = 0
    for i in range(n):
        if ls[i] == max_val:
            if flag == 0:
                flag == 1
                pass
            else:
                total += ls[i]
        else:
            total += ls[i]

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



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from sys import stdin

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

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

input = lambda: stdin.readline()
main()

Submission status: Wrong Answer

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

maxL = max(L)
total = 0
for l in L:
    if l != maxL:
        total += l

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

Submission status: Wrong Answer

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

max_item = max(inputs)
inputs.remove(max(inputs))
print('Yes' if max_item < sum(inputs) else 'NO')

Submission status: Wrong Answer

Solution code:
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

n = I()
Ls = Is()
m = max(Ls)
if sum(Ls) - m < m:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
t = 0
for l in L :
  if l != max(L):
    t += l

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

Submission status: Wrong Answer

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

if sum(polys) - max(polys) > max(polys):
        print('True')
else:
        print('False')

Submission status: Wrong Answer

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


def main():
    """Function."""
    n = int(input())
    ls = list(map(int, input().split()))

    max_val = max(ls)
    total = 0
    for i in range(n):
        if ls[i] == max_val:
            pass
        else:
            total += ls[i]

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



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

su = sum(L)
ma = max(L)

if su - ma > ma:
  print("YES")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
input()
l = map(int, input().split())
sm = sum(l)
ng = False
for li in l:
  if li >= (sm - li):
    ng = True
print('No' if ng else 'Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Accepted

Solution code:
# listを並び替えてif-elseで条件分岐


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

descending_L = sorted(L, reverse=True)
# print(descending_L)

other_side = sum(descending_L[1:])

if descending_L[0] < other_side:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B Polygon
N = int(input())
L = list(map(int, input().split()))
mx = L.pop(L.index(max(L)))
if mx < sum(L):
    print("Yes")
else:
    print("No")
pass

Submission status: Accepted

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

terms = (max(l) < (sum(l) - max(l)))

if terms:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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


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

sorted_list = sorted(my_list, reverse=True)

num = 0
for i in range(1, len(my_list)):
    num += sorted_list[i]

if sorted_list[0] < num:
    answer = 'Yes'
else:
    answer = 'No'

print(answer)

Submission status: Accepted

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

max = 0
kei = 0

for i in range(len(data)):
    kei += data[i]
    if max < data[i]:
        max = data[i]

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

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int,input().split()))
l.sort()
mx = l.pop()
print("Yes" if sum(l) > mx else "No")

Submission status: Accepted

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

theory = (max(L) < (sum(L) - max(L)))

if theory:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

max_l = max(l)
sum_l = sum(l) - max_l

if sum_l - max_l > 0:
    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:n-1]) > l[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())
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()))
sum=0
for i in range(n):
  sum+=l[i]
print("Yes" if max(l)*2<sum 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:
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

n = I()
l = LI()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

max = max(l)
sum = 0


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())
l = list(map(int,input().split()))
sum = 0
flg = True

for i in range(N):
    sum = sum + l[i]
    
for j in range(N):
    if sum - l[j] <= l[j]:
        flg = False
        break
            
if flg == True:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = input()
num = list(map(int, input().split(' ')))
max_num = max(num)
num.remove(max_num)
num_sum = 0
for i in num:
    num_sum += i
if max_num < num_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[:-1]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

ans = 0
for i in range(N):
	ans += L[i]
if max(L) < sum(L)-max(L):
	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())) 

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc117/tasks/abc117_b
S_list = [input() for i in range(2)]
N = map(int,S_list[0].split())    
L_list = list(map(int,S_list[1].split()))
 
if sum(L_list) > max(L_list) * 2:
    result ="Yes"
else:
    result ="No"
print(result)

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc117/tasks/abc117_b
S_list = [input() for i in range(2)]
N = map(int,S_list[0].split())    
L_list = list(map(int,S_list[1].split()))

L_max = max(L_list)
L_sum = sum(L_list) - L_max
if L_sum - L_max > 0:
    result ="Yes"
else:
    result ="No"
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = tuple(map(int, input().split()))
print("Yes" if sum(L) - max(L) > max(L) else "No")

Submission status: Accepted

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

def answer(n: int, l: list) -> str:
    if max(l) < (sum(l) - max(l)):
        return 'Yes'
    else:
        return 'No'

print(answer(n, l))

Submission status: Accepted

Solution code:
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


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


main()

Submission status: Accepted

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

Submission status: Accepted

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

al_max = max(al)
al_sum = sum(al)

if al_sum - al_max *2 >0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
long = list(map(int,input().split()))
one = max(long)
ans = sum(long) - one

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

Submission status: Accepted

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

x=sum(L)
for l in L:
    if l>=x-l:
        print("No")
        break
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
list01 = input().split()
list02 = sorted([int(s) for s in list01])
a = sum(list02) - list02[-1]
if list02[-1] < a:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

# 定理 : 一番長い辺が他の N−1 辺の長さの合計よりも真に短い場合に限り、条件を満たすN角形が描ける。
# 条件を満たすN角形が描けるなら Yes、そうでないなら No を出力せよ。

short_len = sum(len) - max(len)
result = 'Yes' if short_len > max(len) else 'No'
print(result)

Submission status: Accepted

Solution code:
N=int(input())
L=list(map(int,input().split()))
m=max(L)
L.pop(L.index(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()))

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

Submission status: Accepted

Solution code:
#ABC117B
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()))
l.sort()
tmp = 0
for i in range(n-1):
    tmp += l[i]

if l[-1] < tmp:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Notmax_widths = sum(widths) - max(widths)
result = 'Yes' if Notmax_widths > max(widths) else 'No'
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# 一番長い辺が他のN−1辺の長さの合計よりも真に短い場合に限り、条件を満たすN角形が描ける。
if sum(l) - max(l) > max(l):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

    max_l = max(l)
    l.remove(max_l)

    sum_exc_l = sum(l)

    if max_l < sum_exc_l:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 117b

def atc_117b(N: int, Li_input: str) -> str:
    Li = [int(i) for i in Li_input.split(" ")]
    Li = sorted(Li)
    max_length = Li.pop()
    if max_length < sum(Li):
        return "Yes"
    return "No"

N_input_value = int(input())
Li_input_value = input()
print(atc_117b(N_input_value, Li_input_value))

Submission status: Accepted

Solution code:
# 数値の取得
polynum = int(input())
length = list(map(int,input().split()))

# 図形の成立可否を検証し結果を出力
most_l = max(length)
othersum = sum(length) - most_l
if othersum > most_l:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

length = 0

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

length -= max(L)

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

Submission status: Accepted

Solution code:
u = input()
length = list(input().split())
h = [int(i) for i in length]

if max(h) < sum(h)-max(h):
  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()))
sortL = sorted(L)
print('Yes' if sortL[-1] < sum(sortL[:-1]) else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

num_list.sort(reverse=True)
max_num = num_list.pop(0)

sum_left_num = 0

for i in num_list:
    sum_left_num += i

if max_num < sum_left_num:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def answer(n: int, l: []) -> str:
    return 'Yes' if l.pop(l.index(max(l))) < sum(l) else 'No'


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


if __name__ == '__main__':
    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())
L = list(map(int, input().split()))

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

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC117 B:Polygon

N = int(input())
l = [int(i) for i in input().split()]
ans = 'No'
#l = list(map(int,input().split()))

ma = max(l)
su = sum(l) - ma

if su > ma:
    ans ='Yes'
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

import sys

def main():
    input = sys.stdin.readline
    n = input()
    l = list(map(int, input().split()))
    max_l = max(l)
    l.remove(max_l)
    sum_l = sum(l)
    if max_l < sum_l:
        print("Yes")
    else:
        print("No")
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    L = list(map(int,input().split()))
    for i in range(N):
        sum = 0
        for j in range(N):
            sum += L[j]
        sum = sum - L[i]
        if sum <= L[i]:
            return ('No')
    return ('Yes')

print(main())

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり


N = I()
L = LI()
s = sum(L)
m = max(L)
print('Yes' if m < s-m else 'No')

Submission status: Accepted

Solution code:
n, *l = map(int, open(0).read().split())

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

Submission status: Accepted

Solution code:
n=int(input())
l=list(map(int,input().split()))
sl=sum(l)
flag=True
for i in l:
  if sl-i <= i:
    flag=False
    break
if flag:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

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

e_max = max(a)

p = sum(a)-e_max

if e_max < p:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし


N = I()
L = LI()
print('Yes' if max(L) < sum(L)-max(L) else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
L=list(map(int, input().split()))
L.sort(reverse=True)
maxL=L.pop(0)
if maxL< sum(L):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

max_length = L[-1]
sum_length = sum(L[0:len(L)-1])

print("Yes") if max_length < sum_length else print("No")

Submission status: Accepted

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

L.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

m = max(r)
r.pop(r.index(max(r)))

if sum(r) > m:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N = int(readline())
    L = list(map(int, readline().split()))

    first = max(L)
    second = sum(L) - max(L)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    sum_l = sum(l_list)
    max_l = max(l_list)

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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