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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
try:
    Li = [int(x) for x in input().split()]
    Li = sorted(Li, reverse=True)
    if N is not len(Li):
        exit()
    maxL = Li[0]
    a = 0

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

Submission status: Wrong Answer

Solution code:
N = int(input())
Li = [int(x) for x in input().split()]
Li = sorted(Li, reverse=True)

if N is not len(Li):
    exit()
maxL = Li[0]
a = 0

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = input().split()
i = 0
while i < n:
  a[i] = int(a[i])
  i = i + 1 
 
i = 0
while i < n:
  j = i + 1
  while j < n:
    if a[i] < a[j]:
      temp = a[i]
      a[i] = a[j]
      a[j] = temp
    j = j + 1
  i = i + 1
 
sums = sum(a)
print(a[0])
if(sums - a[0] > a[0]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

i = 0
while i < n:
  j = i + 1
  while j < n:
    if a[i] < a[j]:
      temp = a[i]
      a[j] = a[i]
      a[i] = temp
    j = j + 1
  i = i + 1

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

Submission status: Wrong Answer

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

i = 0
while i < n:
  j = i + 1
  while j < n:
    if a[i] < a[j]:
      temp = a[i]
      a[j] = a[i]
      a[j] = temp
    j = j + 1
  i = i + 1

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
deta = list(map(int, input().split()))
#if max(deta) < sum(deta) - max(deta):
#  print("Yes")
#else:
#  print("No")
deta_s = sorted(deta, reverse = True)
if deta_s[0] < sum(deta_s[0:]):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
#abc117b

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

Submission status: Wrong Answer

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

if max(L) < sum(L) - max(L):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

if len(l) != n:
    print("No")
elif l.count(max(l)) >= 2:
    print("No")
elif 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 len(l) != n:
    print("No")
if l.count(max(l)) >= 2:
    print("No")
elif 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 l.count(max(l)) >= 2:
    print("No")
elif 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()]
if max(l) < sum([i for i in l if i != max(l)]):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

m = 0
for i in l:
    if i > m:
        m = i

total = 0
for i in l:
    if i != m:
        total += i

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/python3

N=input()
Ln=input()

ln_splited=Ln.split()
ln_sorted=sorted(ln_splited,reverse=True)
big_num=int(ln_sorted.pop(0))

ln_sorted_sum=0
ans_sum=0

for ln_sorted_sum in ln_sorted:
    ans_sum =int(ans_sum)+ int(ln_sorted_sum) 

if big_num < ans_sum:
    print("Yes")
if big_num >= ans_sum:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

m = 0
for i in l:
    if i > m:
        m = i

total = 0
for i in l:
    if i != m:
        total += i

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

Submission status: Wrong Answer

Solution code:
# _*_ coding:utf-8 _*_
#  Atcoder_Beginner_Contest117-B
#  TODO https://atcoder.jp/contests/abc117/tasks/abc117_b

def solveProblem(lengthList):
	sortedList = sorted(lengthList,reverse=True)
	allIntegerSum = sum(lengthList)
	maxInteger = sortedList.pop(0)
	anotherIntegerSum = allIntegerSum - maxInteger
	if maxInteger < anotherIntegerSum:
		answer="YES"
	else:
		answer="NO"
	return answer

if __name__ == '__main__':
	_ = input()
	lList = list(map(int,input().strip().split(' ')))
	solution = solveProblem(lList)
	print("{}".format(solution))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Ld = sorted(L, reverse=False)
print(Ld)

L_other=0
for i in range(N-1):
  L_other += Ld[i]

print(L_other)
print(Ld[N-1])
if (Ld[N-1] < L_other):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = int(input())
A = list(map(int, input().split())) 
m = max(A)
if sum(A) - int(m) > int(m):
    print("Yes")
elif sum(A) - int(m) <= int(m):
    print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input())
 
# n回ループして配列に入れる
max = 0
other = 0
l = input().split() 
for i in range(index):
 tmp = int(l[i])
 if tmp > max :
    max = tmp 
 else:
    other = other +  tmp
 
if max < tmp:
 print("Yes")
else: 
 print("No")

Submission status: Wrong Answer

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

Ld = sorted(L, reverse=False)
print(Ld)

L_other=0
for i in range(N-1):
  L_other += Ld[i]

if (Ld[N-1] < L_other):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
n = int(input())
x = sorted(list(map(int, input().split())))
sum = 0
if len(x) < 3 or len(x) < n:
    print('NO')
else:
    for i in range(0, len(x) - 1):
        sum += x[i]
    if sum > x[len(x) - 1]:
        print('Yes')
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# Nの取得
index = int(input())
 
# n回ループして配列に入れる
max = 0
other = 0
l = input().split() 
for i in range(index):
 tmp = int(l[i])
 if tmp > max :
    max = tmp 
 else:
    other = other +  tmp
 
if max <= tmp:
 print("Yes")
else: 
 print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
x = sorted(list(map(int, input().split())))
sum = 0
if len(x) < 3:
    print('NO')
for i in range(0, len(x) - 1):
    sum += x[i]
if sum >= x[len(x) - 1]:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
n = int(input())
x = sorted(list(map(int, input().split())))
sum = 0
if len(x) < 3:
    print('NO')
for i in range(0, len(x) - 1):
    sum += x[i]
if sum > x[len(x) - 1]:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
from sys import stdin
 
n = int(stdin.readline().rstrip())
data = list(map(int, stdin.readline().rstrip().split()))
 
def is_s(hens):
  m = max(hens)
  hens.remove(m)
  if m < sum(hens):
  	return True
  else:
    return False
 
print(is_s(data))

Submission status: Wrong Answer

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

# 整数の入力
N = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
l = list(map(int, input().split()))
max = max(l)
#for i in l:
#    print(i)

num = 0
for i in l:
    num=i+num
num = num-max
#print(num)
#print(max)
if num >= max:
    print("Yes")
else:
    print("No")
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

Submission status: Wrong Answer

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

# 整数の入力
N = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
l = list(map(int, input().split()))
max = max(l)
#for i in l:
#    print(i)

num = 0
for i in l:
    num=i+num
num = num-max
print(num)
print(max)
if num >= max:
    print("Yes")
else:
    print("No")
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

Submission status: Wrong Answer

Solution code:
n = int(input())
x = sorted(list(map(int, input().split())))
sum = 0
for i in range(0, len(x) - 1):
    sum += x[i]
if sum > x[len(x) - 1]:
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

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

# print(a/b)
print(L)
s = sum(L)
m = max(L)
print(s)
print(m)
#f = 0
#for x in L:
#    if(x > s - x):
#        f = 1

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

Submission status: Wrong Answer

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

if max(arr) * 2 - sum(arr) > 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

# 整数の入力
N = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
l = list(map(int, input().split()))
max = max(l)
#for i in l:
#    print(i)

num = 0
for i in l:
    num=i

num = num-max

if num >= max:
    print("Yes")
else:
    print("No")
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

Submission status: Wrong Answer

Solution code:
# a,b=map(float,input().split())
# print(a/b)

N = int(input())
# L = []
#L = map(int, input().split())
L = [int(i) for i in input().split()]
#L.append(int(input()))

# print(a/b)
print(L)
s = sum(L)
m = max(L)
#f = 0
#for x in L:
#    if(x > s - x):
#        f = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
L = list(map(int, input().split()))
nagai = int(max(L))
wa = int(sum(L))
if nagai > wa - nagai:
   print('Yes')
elif nagai <= wa - nagai:
   print('No')

Submission status: Wrong Answer

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

# print(a/b)
print(L)
s = sum(L)
m = max(L)
#f = 0
#for x in L:
#    if(x > s - x):
#        f = 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = input()
a = list(map(int, input().split()))
 
max_num = max(a)
num = 0
for i in a:
  if(i != max_num):
    num += i
    
if(num < max_num):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
# L = []
L = map(int, input().split())
# L.append(int(input()))

# print(a/b)
s = sum(L)
f = 0
for x in L:
    if(x > s - x):
        f = 1

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

Submission status: Wrong Answer

Solution code:
N=int(input())
L=list(map(int,input().split()))
s=0
L_max=max(L)
for i in range(0,N):
    if L[i]!=L_max:
        s=s+L[i]

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

Submission status: Wrong Answer

Solution code:
N = int(input())
# L = []
L = map(int, input().split())
# L.append(int(input()))

# print(a/b)
s = sum(L)
f = 0
for x in L:
    if(x > s):
        f = 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
L=list(map(int,input().split()))
s=0
L_max=max(L)
for i in range(0,N):
    if L[i]!=L_max:
        s=s+L[i]

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

Submission status: Wrong Answer

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

for i in range(n):
  if max_num < l[i]:
    max_num = l[i]
    max_index = i


l.pop(max_index)
print(l)

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

if total > max_num: print("Yes")
else: print("No")

Submission status: Wrong Answer

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

# 整数の入力
N = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
l = map(int, input().split())
max = max(l)
num = 0
for i in l:
    num=i[0]+num
num = num-max
if num > max:
    print("Yes")
else:
    print("No")
print(max)
print(num)
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

Submission status: Wrong Answer

Solution code:
N=int(input())
Ls=input().split(" ")
L=[]
for i in Ls:
    L.append(int(i))
mx=max(L)
nm=0
for i in L:
    if mx!=i:
        nm+=i
if nm>mx:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
Ls=input().split()
L=[]
for i in Ls:
    L.append(int(i))
mx=max(L)
nm=0
for i in L:
    if mx!=int(i):
        nm+=int(i)
if nm>mx:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
Ls=input().split(" ")
L=[]
for i in Ls:
    L.append(int(i))
mx=max(L)
nm=0
for i in L:
    if mx!=int(i):
        nm+=int(i)
if nm>mx:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

# 整数の入力
N = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
l = map(int, input().split())
max = max(l)
num = 0
for i in l:
    num=i[0]
num = num-max
if num > max:
    print("Yes")
else:
    print("No")
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

Submission status: Wrong Answer

Solution code:
def judge(n,l):
    for i in range(n):
        for j in range(n):
            s = 0
            if(j!=i):
                s += l[j]
        if(s<l[i]):
            print('No')
            return
    print('Yes')
    return

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

Submission status: Wrong Answer

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

m = max(l)

s = 0
count = 0
for i, num in enumerate(l):
    if num == m and count == 0:
        pass
    else:
        s += num

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

Submission status: Wrong Answer

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

# 整数の入力
N = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
l = map(int, input().split())
max = max(l)
num = 0
for i in l:
    num=i[0]
num = num-max
if num >= max:
    print("Yes")
else:
    print("No")
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
Ls=input().split(" ")
L=[]
for i in Ls:
    L.append(int(i))
mx=max(L)
nm=0
for i in L:
    if mx!=int(i):
        nm+=int(i)
if nm>mx:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N=int(input())
L=list(map(int,input().split()))
s=0
L_max=max(L)
for i in range(0,N):
    if L[i]!=L_max:
        s=s+L[i]

if s>=L_max:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def judge(n,l):
    for i in range(n):
        for j in range(n):
            s = 0
            if(j!=i):
                s += l[j]
        if(s>l[i]):
            print('No')
            return
    print('Yes')
    return

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

Submission status: Wrong Answer

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

    sum_l = sum(l)
    for a in l:
        if a >= sum_l:
            return "No"
    return "Yes"

print(f())

Submission status: Wrong Answer

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

max_num = max(a)
num = 0
for i in a:
  if(i != max_num):
    num += i
    
if(num > max_num):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def judge(n,l):
    for i in range(n):
        for j in range(n):
            s = 0
            if(j!=i):
                s += l[j]
            if(s>l[i]):
                print('No')
                return
    print('Yes')
    return

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

i = 0
while i < n:
  j = i + 1
  while j < n:
    if a[i] < a[j]:
      temp = a[i]
      a[i] = a[j]
      a[j] = a[i]
    j = j + 1
  i = i + 1

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

Submission status: Wrong Answer

Solution code:
n = input()
EdgeLength=input().split()
#print(EdgeLength)
N = int(n)
EdgeLength = [int(i) for i in EdgeLength]

#list(map(int, EdgeLength))

EdgeLength.sort()
print(EdgeLength)

sumL = sum(EdgeLength) - EdgeLength[N-1]

#for i in range(N-1):
    #sumL += edgeLength[i]


if EdgeLength[N-1] < sumL:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

max_num = max(a)
num = 0
for i in a:
  if(max_num != i):
    num += i
    
if(num > max_num):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

def judge(n,l):
    for i in range(n):
        for j in range(j):
            s = 0
            if(j!=i):
                s += l[j]
            if(s>l[i]):
                print('No')
                return
    print('Yes')
    return

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(map(int, input().split()))
l = sorted(l)
sum1 = 0
for i in range(1,len(l)):
    sum1 += l[i]
if sum1 > l[0]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=int(input())
Ls=input().split()
mx=int(max(Ls))
n=0
for i in Ls:
    if mx!=int(i):
        n+=int(i)
if n>mx:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = [input() for i in range(2)]
sides = [int(i) for i in s[1].split()]
sides = sorted(sides,reverse=True)
long_side= sides.pop(0)

total = 0
for side in sides:
  total += side
  
if long_side < total:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

max = max(l);
l.remove(max);

all = 0

for p in l:
    all+=p

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

Submission status: Wrong Answer

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

max = max(l);
l.remove(max);

all = 0

for p in l:
    all+=p

if all > max:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
s = [input() for i in range(2)]
sides = [int(i) for i in s[1].split()]
sides = sorted(sides,reverse=True)
long = sides.pop(0)

total = 0
for side in sides:
  total += side
  
if long < total:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

max = max(l);
l.remove(max);

all = 0

for p in l:
    all+=p

if all > max:
	print("No")
else:
	print("Yes")

Submission status: Wrong Answer

Solution code:
from sys import stdin


############################################
#from sys import stdin
import numpy as np

# read data for n sequences.
n = int(stdin.readline())
data = np.zeros(n)
d = stdin.readline().split()
for i,x in enumerate(d):
    data[i] = int(x)

max = np.max(data)
if max>= np.sum(data)-max:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

n = int(input())
lst = input().split()
lst.sort()

max_ = int(lst[-1])
for elem in lst[0:-1]:
    max_ = max_ - int(elem)
if max_ < 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

L2 = sorted(L)
print(N, L2)

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

Submission status: Wrong Answer

Solution code:
import math
import sys
n = int(raw_input())
l = map(int, raw_input().split())
l.sort()
sum = 0
for i in range(n-1):
	sum += l[i]
if sum < l[n-1]:
	print("Yes")
else:
	print("No")

Submission status: Wrong Answer

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

def main():
    int(input())
    l = [int(e) for e in input().split(" ")]
    max_l = max(l)
    s = 0
    once = True
    for e in l:
        if e != max_l and once:
            s += e
            once = False

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

main()

Submission status: Wrong Answer

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

num = int(input())

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

def get_max(sides):
    idx = 0
    _max = sides[idx]
    
    for i, side in enumerate(sides):
        if _max < side:
            _max = side
            idx = i
    return idx, _max
    
idx, _max = get_max(sides)

total = 0
for side in sides:
    if side == _max:
        continue
    total += side
    
if _max < total:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

max = max(L)
add = sum([l for l in L if not l == max])
if max < add:
  print("Yes")
else:
  print("No")

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(max_,sum_-max_)
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = int(input())
Ls = input().split()
for i in range(N):
    Ls[i] = int(Ls[i])
print(Ls)
max_L = max(Ls)
sum_others = sum(Ls) - max_L
if max_L < sum_others:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
N = None

for i,line in enumerate(sys.stdin):
    if i == 0:
        N = int(line)
    if i == 1:
        lines = [int(i) for i in line.split(" ")]
        if (sum(lines) - max(lines)) > max(lines):
            print("YES")
        else:
            print("NO")

Submission status: Wrong Answer

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

L.sort()
L.reverse()

print("YES" if sum(L) > int(2*L[0]) else "NO")

Submission status: Wrong Answer

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

max = 0
ignore = 0
temp = 0

for i, value in enumerate(li):
  if value > max:
    max = value
    ignore = i

for i, value in enumerate(li):
  if i == ignore:
    continue
  else:
    temp += value
    
if max < temp:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

m = max(l)

s = 0
for i, num in enumerate(l):
    if num != m:
        s += num

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
Lng=0
sumL=0
for i in range(N):
    if Lng<int(L[i]):
        sumL=Lng
        Lng=int(L[i])
    else:
        sumL=sumL+int(L[i])
if Lng<sumL:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())
L = [int(i) for i in input().split()]
s = 0
for i in range(N):
    if L[i]<max(L):
        s+=L[i]
if s>max(L):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input()
b = input().split()
b = [int(n) for n in b]
b = sorted(b)
m = b.pop(-1)
if m < sum(b):
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
N = int(input())

L = []

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

saidai = max(L)

goukei  = sum(L)

goukei = goukei - saidai

if saidai < goukei :
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

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

L_list.sort()

print(sum(L_list[0:-1]))
if sum(L_list[0:-1]) > L_list[-1]:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
L = input().split()
L = [int(i) for i in L]
L = sorted(L, reverse=True)
hen = 0

for i in range(1, N):
    hen += L[i]
if L[0] < hen:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import numpy as np


n = input()
a = list(int(i) for i in input().split())  
arg = np.argmax(a)
max_a = a[arg]
a = np.delete(a,arg)
if np.sum(a) < max_a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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


a = max(L)
L.remove(a)

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

Submission status: Wrong Answer

Solution code:
N = int(input())
Lli = input().split()
L = [int(i) for i in Lli]
sL = sorted(L)
if sum(sL[:-1]) < sL[-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[:N-1])>l[-1]:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding: utf-8
N = int(input())
L = list(map(int, input().split()))
max_ = max(L)
if max_ < sum(L) - max_:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

L.sort()
ans = 'YES' if sum(L[:N - 1]) > L[N - 1] else 'NO'
print(ans)