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

cur_longest = 0
sum_others = 0

for l in ls:
    sum_others += l
    if l > cur_longest:
        sum_others -= l
        sum_others += cur_longest
        cur_longest = l

print(cur_longest, sum_others)

if cur_longest >= sum_others:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

cur_longest = 0
sum_others = 0

for l in ls:
    sum_others += l
    if l > cur_longest:
        sum_others -= l
        sum_others += cur_longest
        cur_longest = l

print(cur_longest, sum_others)

if cur_longest > sum_others:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

max_b = max(B)
if sum(B) - max_b > max_b:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
N=int(input())
alist=[int(x) for x in input().split()]
m=0
s=0
for i in range(N):
  if alist[i]>=m:
    m=alist[i]
for j in range(N):
  if alist[j]<m:
    s=s+alist[j]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num=input()
lineLength=input().split(" ")
sortedLength=sorted(lineLength, reverse=True)
maxLength=int(sortedLength[0])
sumLength=0
for i in range(len(sortedLength)-1):
  sumLength=sumLength+int(sortedLength[i+1])
if maxLength>=sumLength:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
num=input()
lineLength=input().split(" ")
sortedLength=sorted(lineLength, reverse=True)
maxLength=int(sortedLength[0])
sumLength=0
for i in range(len(sortedLength)-1):
  sumLength=sumLength+int(sortedLength[i+1])
if maxLength>sumLength:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

table.sort()
sums = 0
for x in range(0, len(table) - 1):
    sums += table[x]
print(sums)
if max(table) < sums:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

table.sort()
sums = 0
for x in range(0, len(table) - 1):
    sums += table[x]

if max(table) > sums:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

table.sort()
sum = 0
for x in range(0,len(table) -1):
    sum += table[x]

if max(table) > x:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

L_max = max(L)

print(L_max)

L_Down =sorted(L,reverse=True)

print(L_Down)

L_Down_Re = L_Down[1:len(L_Down)]

print(L_Down_Re)

L_Down_Re_Sum =  sum(L_Down_Re)

print(L_Down_Re_Sum)

if L_max <= L_Down_Re_Sum:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=input().rstrip().split()
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [int(i) for i in range(N)]
longest = L[0]
for i in range(1, len(L)):
    if L[i] > longest:
        longest = L[i]
if 2 * longest < sum(L):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n=int(input())
lst=list(map(int,input().split()))
maxval=max(lst)
sumval=sum(lst)
if maxval<sumval-maxval:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n=int(input())
lst=list(map(int,input().split()))
lst.sort()
maxval=lst.pop(-1)
sumval=sum(lst)
sumval=sum(lst)
if maxval<sumval:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n=int(input())
lst=list(map(int,input().split()))
maxval=max(lst)
lst.remove(maxval)
sumval=sum(lst)
if maxval<sumval:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

aaa =sum(L_list)-max(L_list)-max(L_list)

if aaa >=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int,input().split()))
L_copy = L.copy()
max = max(L)
L_copy.pop(L.index(max))

if max > sum(L_copy):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
list = [int(_) for _ in input().split()]

ans = 0
flag = 1
for i in range(N):
  for j in range(N):
    if i!=j:
      ans += list[j]
    
  if ans < i:
      flag = 0
      break

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

Submission status: Wrong Answer

Solution code:
input()
ls = list(map(int, input().split()))
lmax = max(ls)
lmaxi = ls.index(lmax)
lss = ls[:lmaxi] + ls[lmaxi+1:]

print("Yes" if sum(lss) < lmax else "No")

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
b=np.array(a)
if b[0]<b[1:].sum():
  print('yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
L = list(map(int, input().split()))

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

l.sort()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
sides = []
sides2 = input()
sides2 = sides2.split()
for i in sides2:
  sides.append(int(i))
maxim = max(sides)
if maxim>sum(sides)-maxim:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

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

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

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

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

if max >= total:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_ = input()
cand_list = list(map(int, input().split()))
max_val = max(cand_list)
print('Yes' if len([i for i in cand_list if i < max_val])==len(cand_list) else 'No')

Submission status: Wrong Answer

Solution code:
import functools

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

if n < 3 or 10 < n:
	print('No')
	exit()

for x in l:
	if x < 1 or 100 < 10:
		print('No')
		exit()
    
longest = functools.reduce(lambda x,y: x if x > y else y, l, True)
sum = functools.reduce(lambda x,y: x + y, l, True) - longest

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

Submission status: Wrong Answer

Solution code:
import functools

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

longest = functools.reduce(lambda x,y: x if x > y else y, l, True)
sum = functools.reduce(lambda x,y: x + y, l, True) - longest

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l =[int() for i in input().split()]
l.sort(reverse=True)
m = l.pop(0)
if m < sum(l):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

n=int(input())  #数値入力 「N」だけの入力のとき
h=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
cnt=0
L=0
while L != len(h):
    if h[L] != 0:
        for r in range(L+1 ,len(h)):
            if h[r] == 0:
                #do it
                for k in range(L,r):
                    h[k]-=1
                cnt+=1
                break
        else:
            r = len(h)
            for k in range(L,r):
                h[k]-=1
            cnt+=1
    elif h[L] == 0:
        L+=1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(map(int,input().split()))
l_M=max(l)
if sum([i for i in l if i!=l_M])>l_M:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

smt = sm - mx

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

Submission status: Wrong Answer

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

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

smt = sm - mx

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

Submission status: Wrong Answer

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

Solution code:
N = int(input())
L = list(map(int, input().split()))
M = max(L)
L.remove(M)
i = 0
for j in L:
    j += i
if j > M:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
M = max(L)
L.remove(M)
i = 0
for j in L:
    j += i
if i > M:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = list(map(int, input().split()))
M = max(L)
L.remove(M)
for i in L:
    i += i
if i > M:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
lst = input().split(" ")
lst2 = []
for i in lst:
    int_i = int(i)
    #print(int_i)
    lst2.append(int_i)
#print(lst2)
max  = max(lst2)
sum = sum(lst2)
if sum - max > max:
    print("YES")
else:
    print("NO")
#input()

Submission status: Wrong Answer

Solution code:
N = input()
lst = input().split(" ")
lst2 = []
for i in lst:
    int_i = int(i)
    #print(int_i)
    lst2.append(int_i)
#print(lst2)
max  = max(lst2)
sum = sum(lst2)
if sum - max < max:
    print("YES")
else:
    print("NO")
#input()

Submission status: Wrong Answer

Solution code:
N = input()
lst = input().split(" ")
lst2 = []
for i in lst:
    int_i = int(i)
    print(int_i)
    lst2.append(int_i)
max  = max(lst2)
sum = sum(lst2)
if sum - max < max:
    print("YES")
else:
    print("NO")
#input()

Submission status: Wrong Answer

Solution code:
N = input()
lst = input().split(" ")
lst2 = []
for i in lst:
    int_i = int(i)
    print(int_i)
    lst2.append(int_i)
print(lst2)
max  = max(lst2)
sum = sum(lst2)
if sum - max < max:
    print("YES")
else:
    print("NO")
#input()

Submission status: Wrong Answer

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

if sum(li) - 2*max(li) > 0:
  print("Yes")
else: print("No")

Submission status: Wrong Answer

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

dmax = max(d)

dsum = sum(d)

tan = dsum - dmax
print(dmax)
print(tan)
if tan > dmax:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

dmax = max(d)

dsum = sum(d)

tan = sum(d) - max(d)

if tan < dmax:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
L = LIST()

tmp = max(L)
L.remove(tmp)
if tmp - sum(L) > 0:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

Solution code:
N = input()
L = list(map(int,input().split()))
Ma1 = max(L)
Su1 = sum(L)
if Ma1 >= Su1 - Ma1:
  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) - max(L)):
  print('NO')
else:
  print('YES')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in l[:-1]:
  s += i
  
if l[0] > s:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

for i in l[1:]:
  s += i
  
if l[0] > s:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int,input().split()))
maxlen = max(l)
l.remove(maxlen)
s = 0

for i in l:
  s += i
  
if maxlen > s:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N= int(input())
L= list(map(int, input().split()))
print("YNeos"[max(L)*2>sum(L)::2])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
l = list(map(int, input().split()))
maxi = max(l)
l[l.index(max(l))]=0
print(l)
tmp=0
for x in l:
    tmp+=x

if tmp<=maxi:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
n=int(input())
l = list(map(int, input().split()))
maxi = max(l)
l[l.index(max(l))]=0
tmp=0
for x in l:
    tmp+=x

if tmp<=maxi:
    print("no")
else:
    print("yes")

Submission status: Wrong Answer

Solution code:
n=int(input())
l = list(map(int, input().split()))
maxi = max(l)
l[l.index(max(l))]=0
print(maxi)
tmp=0
for x in l:
    tmp+=x

if tmp>=maxi:
    print("no")
else:
    print("yes")

Submission status: Wrong Answer

Solution code:
input_a = int(input())
input_list = list(map(int, input().split()))
input_list.sort()
sum = 0
for i in range(input_a - 1):
    sum += input_list[i]

if input_list[input_a - 1] < sum:
    print("yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int,input().split()))
sortl = sorted(l)
ans = 0
for number in sortl:
         ans += number
if ans - sortl[n-1] >= sortl[n-1]:
         print("No")
else:
         print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [int() for i in input().split()]
big = max(L)
big_index = L.index(big)
L[big_index] = 0
a = sum(L)
if a > big:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [int() for i in input().split()]
big = max(L)
big_index = L.index(big)
L[big_index] = 0
sum = sum(L)
if sum > big:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
b=list(map(int,input().split()))
c=sorted(b)
print(sum(b[:-2])>b[-1])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

line_sum = 0
for i in i_list[:-2]:
  line_sum += i

if i_list[-1] < line_sum:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

line_sum = 0
for i in i_list[:-2]:
  line_sum += i

if i_list[-1] < line_sum:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n = int(input())

l = list(map(int, input().split()))
thr = sum(l) / 2

for i in range(n):
  if l[i] > thr:
    print("No")
    break
else: print("Yes")

Submission status: Wrong Answer

Solution code:
n = int(input())

l = list(map(int, input().split()))
thr = sum(l) / 2

for i in range(n):
  if l[i] > thr:
    print("No")
else: print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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]

print(max_line) 
if max_line < 0 :
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
l = [int(i) for i in input().split()] 
 
max_val = max(l)
sum_val = 0
f = False
 
for i in l:
  if i == max_val and not f:
    f = True
    continue
  sum_val +=i
 
if max_val < sum_val:
  print('yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = input()
l = [int(i) for i in input().split()] 
 
max_val = max(l)
sum_val = 0
 
for i in l:
  if i == max_val:
    continue
  sum_val +=i
 
if max_val < sum_val:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

max_val = max(l)
sum_val = 0

for i in l:
  if i == max_val:
    continue
  sum_val +=i

if max_val < sum_val:
  print('yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a = input()

print(a)

Submission status: Wrong Answer

Solution code:
def main40():
    num = int(input())
    data = input().split()
    l = []
    for i in range(num):
        l.append(int(data[i]))
    for i in range(num):
        result = 0
        for j in range(num):
            if i != j:
                result = result + l[j]
        if result < l[i]:
            print("No")
            return
    print("Yes")

if __name__ == "__main__":
    main40()

Submission status: Wrong Answer

Solution code:
def main40():
    num = int(input())
    data = input().split()
    l = []
    for i in range(num):
        l.append(int(data[i]))
    for i in range(num):
        result = 0
        for j in range(num):
            if i != j:
                result = result + l[j]
        if result < l[i]:
            print(i)
            print("No")
            return
    print("Yes")

if __name__ == "__main__":
    main40()

Submission status: Wrong Answer

Solution code:
def main40():
    num = int(input())
    data = input().split()
    l = []
    for i in range(num):
        l.append(int(data[i]))
    for i in range(num):
        result = 0
        for j in range(num):
            if i != j:
                result = result + l[j]
        if result > l[i]:
            print("No")
            return
    print("Yes")

if __name__ == "__main__":
    main40()

Submission status: Wrong Answer

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

s = 0
maxL = 0
maxi = -1

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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


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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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 if x < max_l]) > max_l else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

L = sorted(L)

if L[len(L)-1] < sum(L[0:len(L)-1]):
    print('yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

count=0

L.sort(reverse=True)

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

if count>L[0]:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

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[-1] < c:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Solution code:
input()
a=list(map(int,input().split()))
print("YNeos"[max(a)*2>sum(a)::2])

Submission status: Wrong Answer

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

Solution code:

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

L.reverse()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

s=sum(A)
a=max(A)

answer="NO"if a>=s-a else"YES"
print(answer)

Submission status: Wrong Answer

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

s = sum(A)
a = max(A)

answer = 'No' if a > s-a else 'Yes'
print(answer)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
#定理 : 一番長い辺が他のN−1辺の長さの合計よりも真に短い場合に限り、条件を満たすN角形が描ける。
N = int(input())
L = list(map(int, input().split()))

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

Submission status: Wrong Answer

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

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