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: Runtime Error

Solution code:
N = int(input())
l = list()

for i in range(N):
  n = int(input())
  l.append(n)
 
m = max(l)
SUM = sum(l) - m
 
if m < SUM:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
l = list()

for i in range(N):
  n = int(input())
  l.append(n)
 
m = max(l)
SUM = sum(l) - m
 
if m > SUM:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
l = list()

for i in range(N):
  n = int(input())
  l.append(n)
 
m = max(l)
SUM = sum(l) - m
 
if m > SUM:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
N = int(input())
l = list[]

for i in N:
  n = int(input())
  l.append(n)

m = l.max()
SUM = l.sum() - m

if m > SUM:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
numN = int(input())
args = input()

lines = list()


for i in range(numN):
    list.append(int(args[0:args.find(" ")]))

list_sorted = list.sorted
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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
N = int(n)
a = [input() for i in range(N)]
a = int(a)
if max(a)　>=　sum(a) - max(a):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
a = int([input() for i in range(N)])
if max(a)　>=　sum(a) - max(a):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
a = [input() for i in range(N)]
if max(a)　>=　sum(a) - max(a):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N = input()
a = [input() for i in range(N)]

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

Submission status: Runtime Error

Solution code:
N = input()
a = [input() for i in range(N)]

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

Submission status: Runtime Error

Solution code:
N = input()
a = [input() for i in range(N)]

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

Submission status: Runtime Error

Solution code:
N = input()
a = [input() for i in range(N)]

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

Submission status: Runtime Error

Solution code:
n = int(input())

L = [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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
_ = input()

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

max_ = max(nums)

pop(nums.index(max_))

rest = sum(nums)

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

l.sort(reverse=True)
l2.sort()
for num in range(n):
	if(l[0] > sum(l2[:n])):
  		print("Yes")
		break
print("No")

Submission status: Runtime Error

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

l.sort(reverse=True)
l2.sort()
for num in range(n):
	if(l[0] > sum(l2[1:n])):
  		print("Yes")
		break
print("No")

Submission status: Runtime Error

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

l.sort(reverse=True)
l2.sort()
for num in range(n)
	if(l[0] > sum(l2[1:n])):
  		print("Yes")
		break
print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
list = list(map(int,input().split()))
list.sort()
for val in list:
	sum += val
sum = sum - list[N-1]
if(sum > list[N-1]):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
list = list(map(int,input().split()))
list.sort()
for val in list:
	sum += val
sum = sum - list[len(list)]
if(sum > list[len(list)]):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
l=[input() for i in range(n)]
l.sort()
sum=0

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

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

Submission status: Runtime Error

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

M = L.pop(max(L))

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

Submission status: Runtime Error

Solution code:
N = int(input())
max_L = 0
sum_L = 0
for i in range(0, N):
  L = int(input())
  if L > max_L:
    max_L = L
  sum_L += L

if sum_L - max_L > max_L:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main() {

    int n;
    cin >> n;
    int arr[n];
    int sm = 0;
    for (int i=0; i<n; i++) {
        cin >> arr[i];
        sm += arr[i];
    }
    sort(arr, arr+n);
    sm -= arr[n-1];
    if (arr[n-1] < sm) {
        cout << "Yes";
    }
    else {
        cout << "No";
    }

}

Submission status: Runtime Error

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
if(max(a) > (sum(a) - max(a)):
   print("NO")
else:
   print("YES")

Submission status: Runtime Error

Solution code:
N = int(input())

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

L_lst.sort()
L_sum = sum(L_lst)
L_max = L_lst[-1]

if L_max * 2 >= L_sum:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = list(input())
max_N = max(N)

if max_N < sum(N)-max_N :
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

a = sorted(a)

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

Submission status: Runtime Error

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

a = sorted(a)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input)
l = list(map(int, input().split()))
x = max(l)
s = sum(l)
if x < (s-x):
    print("Yes")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
k=int(input())
ans=''
for i in range(n):
    if s[i]==s[k]:
        ans+=s[i]
    else:
        ans+='*'
print(ans)

Submission status: Runtime Error

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

Max = max(s)

for i in range(n):
    Sum += s[n]
    
if Max < Sum - Max:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
arr=[int(input()) for _ in range(n)]
arr=sorted(arr)
total=sum(arr[:-1])
if arr[-1]<total:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
#ABC117 B
N = int(input())
Ln = list(map(int, input().split()))
Ln.sort()
max = L[0]
sum = sum(ln)
    
if max < max - sum:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
#ABC117 B
N = int(input())
Ln = [input() for i in range(N)]
Ln.sort()
max = L[0]
sun = 0
for i in N-1:
    sum += L[i+1]
    
if max < sum:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
#ABC117 B
N = int(input()
Ln = [input() for i in range(N)]
Ln.sort()
max = L[0]
sun = 0
for i in N-1:
sum += L[i+1]
    
if max < sum:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

x.sort()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
l = [int(input()) for i in range(n)]
print("Yes" if (sum(l) - max(l)) > max(l) else "No")

Submission status: Runtime Error

Solution code:

n = int(input())
l = [int(input()) for i in range(n)]
print("Yes" if sum(l) - max(l) > max(l) else "No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

L.sort
if sum(L[:-1]) > L[-1]
    ans = "Yes"
else: ans = "No"

print(ans)

Submission status: Runtime Error

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

M = max(L)
L2 = L.remove(M)
if M < sum(L2):
	print('Yes')
else:
	print('No')

Submission status: Runtime Error

Solution code:
n,ans,l=int(input()),"Yes",list(map(int,input()))
for i in l:
  if sum(l)<i*2:ans="No"
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
l=[int(input()) for i in range(n)]
a=sun(l)
ans='Yes'
for i in l:
  if a-i<i:
    ans='No'
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
N = 5
l_list = []
l_max = np.max(l_list)
l_list.remove(l_max)
l_sum = np.sum(l_list)

if l_max>=l_sum:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
trash = input()
input_1 = input().split(' ')
if max(input_1) < (sum(input_1) - max(input_1)):
	print('Yes')
else:
	print('No')

Submission status: Runtime Error

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007
#A
def A():
    t,x = LI()
    print(t/x)

#B
def B():
    n= II()
    a = LI()
    m = max(a)
    if m >= sum(a)-m:
        print("No")
    else:
        print("Yes")


#C
def C():
    n,m = LI()
    x = LI()
    x.sort()
    l = [x[i+1]-x[i] for i in range(m-1)]
    l.sort()
    l = l[::-1]
    ans = sum(l[max(n-1,0):])
    print(ans)

#D
def D():
    n,k = LI()
    a = LI()
    k = list(map(int,list(bin(k)[2:])))
    l = len(k)
    for i in range(n):
        a[i] = list(map(int,list(bin(a[i])[2:])))
        l = max(l,len(a[i]))
    for i in range(n):
        for j in range(l-len(a[i])):
            a[i].insert(0,0)
    for j in range(l-len(k)):
        k.insert(0,0)
    s = [[0,0] for i in range(l)]
    pow2 = [1 for i in range(l)]
    for i in range(l-1)[::-1]:
        pow2[i] = pow2[i+1]*2
    for i in a:
        for j in range(l):
            s[j][0] += pow2[j]*i[j]
            s[j][1] += pow2[j]*(not i[j])
    dp = [0 for i in range(l+1)]
    small = False
    for i in range(l):
        if not small:
            if not k[i]:
                dp[i+1] += dp[i]+s[i][0]
            else:
                if s[i][0] >= s[i][1]:
                    dp[i+1] += dp[i]+s[i][0]
                    small = True
                else:
                    dp[i+1] += dp[i]+s[i][1]
        else:
            dp[i+1] += dp[i]+max(s[i])
    print(dp[l])

#E
if __name__ == "__main__":
    B()

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Runtime Error

Solution code:
size = int(input())
sides = []
for _ in range(len):
  sides.append(int(input()))
big = max(sides)
together = sum(sides)
if(big < together):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
max=0
sum=0
for i in range(n):
  a=int(input())
  if a>=max:
    max=a
  sum=sum+a
if sum-a<a:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
L = input().split()
b=0
L.sort()

a = L.pop(-1)

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

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

Submission status: Runtime Error

Solution code:
n=int(input())
array=[]
for i in range(n):
  k=int(input())
  array.append(k)
array.sort()
sum=0
for i in range(n-1):
  sum+=array[i]
if array[n-1]<sum:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
n=int(input())
array=[]
for i in range(n):
  k=int(input())
  array.append(k)
array.sorted()
sum=0
for i in range(n-1):
  sum+=array[i]
if array[n-1]<sum:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
if sum(sorted([int(x) for x in input().split()]) > 2*sorted([int(x) for x in input().split()][-1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
if sum(sorted([int(x) for x in input().split()]) > 2*Llist[-1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
if sum([int(x) for x in input().split()].sort()) > 2*Llist[-1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
l_list = list(int(input()) for _ in range(N))
max_l=max(l_list)
if sum(l_list)-max_l>max_l:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
l_list=[int(input())for _ in range(N)]
max_l=max(l_list)
if sum(l_list)-max_l>max_l:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
L = [int(input()) for i in range(N-1)]
if max(L) < sum(L) - max(L):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
L = [for i in range(N-1)]
if max(i) < sum(i) - max(i):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n = int(input())
l = map(int, input().split())
s = 0
t = 0
for x in l:
  s += x
  t = max(x, t)
if s>t:
  print(Yes)
else:
  print(No)

Submission status: Runtime Error

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

for i in range(N)
	sum += listL[i-1]
  
sum = sum - maxL

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
x=list(map(int,input().split()))
x.sort()
y=[x[i+1]-x[i] for i in range(m-1)]
y.sort()
if n<m:
    print(sum(y[:m-n]))
else:
    print(0)

Submission status: Runtime Error

Solution code:
./ABC/117/abc117B.py

Submission status: Runtime Error

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

listA=[]
for i in range(n):
    listA.append(list(map(int,input().split())))

for i in range(n):
    popped_item1=listA[i].pop(0)

listB=[]
for i in listA:
    for j in i:
        listB.append(j)

cnt=0
for i in range(m+1):
    if listB.count(i)==n:
        cnt+=1
print(cnt)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n = int(input())
nums = list(map(int, input().split()))
nums.sort()
max = nums.pop(-1)
print(sum(nums))

if(sum(nums) > max):
    print("yes")
elif(sum(nums) <= max)
    print("no")

Submission status: Runtime Error

Solution code:
def solve(string):
    nl = map(int, string.split())
    l = sorted(list(nl)[1:])
    return "Yes" if sum(l[:-1]) > l[-1] else "No"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Runtime Error

Solution code:
def solve(string):
    n, *l = map(int, string.split())
    l= sorted(l)
    return "Yes" if sum(l[:-1]) > l[-1] else "No"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Runtime Error

Solution code:
def solve(string):
    n, *l = map(int, string.split())
    l = sorted(l)
    return "Yes" if sum(l[:-1]) > l[-1] else "No"


if __name__ == '__main__':
    print(solve("\n".join[input(), input()]))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
L = [int(n) for n in input().split()]
maxL = max(L)
if maxL < sum(L) - maxL
	print("yes")
else:
	print("no")

Submission status: Runtime Error

Solution code:
a=input()
c=list(map(int, input().split(" ")))
 
from statistics import mean, median,variance,stdev
 
if sum(list1)-max(list1)< max(list1):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

from statistics import mean, median,variance,stdev

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

Submission status: Runtime Error

Solution code:
i=input;i();l=i().split();print(max(l)*2<sum(l)and"Yes"or"No")

Submission status: Runtime Error

Solution code:
s1=input()
s2=input().split()
a=sorted(s2,reverse=True)

max=int(a[0])
cnt=a[1:]
all=sum(int(i) for i in cnt)

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

Submission status: Runtime Error

Solution code:
s1=input()
s2=input().split()
a=sorted(s2,reverse=True)

max=a[0]
cnt=a[1:]
all=sum(int(i) for i in cnt)

if(max<all){
  print('Yes')
}else{
  print('No')
}

Submission status: Runtime Error

Solution code:
# the number of inputs
N = int(input())
# each length of edges
Ls= map(int(), input().split())
largestL = 0
largestIndex = 0
 
# straightforward way
for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i
 
sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]
 
if sumOfSmallLs < largestL:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
# the number of inputs
N = int(input())
# each length of edges
Ls= map(int, input().split())
largestL = 0
largestIndex = 0

# straightforward way
for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i

sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]

if sumOfSmallLs < largestL:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
X,T = map(int, input().split(' '))

print(f'{T/X/1.0}000')

Submission status: Runtime Error

Solution code:
X,T = map(int, input().split(' '))

print(f'{T/X/1.0}000)

Submission status: Runtime Error

Solution code:
N = int(input())
L = [int(input()) for _ in range(N)]

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

Submission status: Runtime Error

Solution code:
N = int(input())
L = list(map(int, input().split()))
ans = 'Yes' 
if max(L) >= sum(L.pop(L.index.max(L))):
    ans = 'No'
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
Lin = input().split(" ")

Lls = []

for i in range(0,N):
    Lls.append(Lin[i])

Lls.sort(reverse = True)

maxSide = Lls[0]
otherSide = 0
for i in range(1,N):
    otherSide = otherSide + Lls[i]

if maxSide < otherSide:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
Lin = input().split(" ")

Lls = []

for i in range(0,N):
    Lls.append(Lin[i])

Lls.sort(reverse = True)

maxSide = Lls[0]
otherSide = 0
for i in range(1,N):
    otherSide = otherSide + Lls[i]

if maxSide < otherSide:
    print("Yes")
other:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
number_list = []
for i in map(int, input().split()):
    number_list += [i]

for i in range(N-1):
    for j in range(N):
        if i < j:
            if number_list[i] > number_list[j]:
                a = number_list[i]
                number_list[i] = number_list[j]
                number_list[j] = a

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

if sum > number_list[N]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s = sum(l)
res = "Yes"
for x in l:
  if (2*x>=s):
    res = "No"
print(res)

Submission status: Runtime Error

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

s = sum(l)

for x in l:
  if (2*x>=s):
    print("No")
    exit(0)
print("Yes")

Submission status: Runtime Error

Solution code:
num = int(input())
l = list(map(int, input().split()))
max = l.pop(max(l))
for i in range(len(l)):
    if max < l[i]:
        print('No')
        exit(0)
print('Yes')

Submission status: Runtime Error

Solution code:
n = input()

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

l.sort(reverse=True)

total = l.sum()

if (total - 2 * l[0] > 0 ) :
  print("yes")
else:
  print("no")

Submission status: Runtime Error

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

 
maxL = max(L)
sumL = sum(L) - maxL
           
if maxL >= sumL :
           return 'No'
else:
           return 'Yes'