TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
def main():
    n = int(input())
    l = list(map(int,input().split()))
    lmax = max(l)

    s = sum(l) - 2*max(l)

    if s > 0:
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

def main():
    n = int(input())
    l = list(map(int,input().split()))
    lmax = max(l)

    l.remove(lmax)

    if lmax < sum(l) :
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

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

    s = sum(l) - 2*max(l)

    if (s > 0):
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

def main():
    n = int(input())
    l = list(map(int,input().split()))
    s = 0
    lmax = max(l)

    l.remove(lmax)

    for i in l:
        s += i
    if lmax < s :
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

def main():
    n = int(input())
    l = list(map(int,input().split()))
    s = 0
    lmax = max(l)

    l.remove(lmax)

    for i in l:
        s += i
    if lmax < s :
        print("YES")
    elif lmax >= s :
        print("NO")

if __name__ == '__main__':
    main()

def main():
    n = int(input())
    l = list(map(int,input().split()))
    s = 0
    lmax = max(l)

    l.remove(lmax)

    for i in l:
        s += i
    if lmax < s :
        print("YES")
    elif lmax >= s :
        print("NO")

if __name__ == '__main__':
    main()

def main():
    n = int(input())
    l = list(map(int,input().split()))
    lmax = max(l)



    if lmax < ( sum(l) - lmax ) :
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()

def main():
    n = int(input())
    l = list(map(int,input().split()))
    s = 0
    lmax = max(l)

    l.remove(lmax)

    for i in l:
        s += i
    if lmax < s :
        print("Yes")
    elif lmax >= s :
        print("No")

if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def nyu():
    N = int(input())
    L = list(map(int,input().split()))
    L.sort()

    return N,L

def check(N,L):
    sum =0 

    for n in range(N-1):
        sum += L[n]
    if sum > L[N-1]:
        print("YES")
    else:
        print("NO")
    



N,L =nyu()
check(N,L)







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

    return N,L

def check(N,L):
    sum =0 

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



N,L =nyu()
check(N,L)







Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = input()
a  list(map(int,input().split()))

a = sorted(a)

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

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

a = sorted(a)

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


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

a = sorted(a)

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


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

a = sorted(a)

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


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
l=list(map(int,input().split()))
cnt=0
l.sort()
for i in range(0,n-1):
  cnt+=l[i]
if cnt>l[n]:
  print("Yes")
else:
  print("No")

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
l = list(input().split())

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

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


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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

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


n = int(input())
l = list(input().split())

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

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


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

l.sort(reverse=true)

lm = l[0]
del l[0]

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

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

l.sort(reverse = True)

lm = l[0]

del l[0]

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

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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')


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

l.sort(reverse = True)

if len(l) == n:
  lm = l[0]

  del l[0]

  if int(lm) < sum(l):
    print('Yes')
  else:
    print('No')
else:
  print('No')


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
l = list(map(int.input().split()))

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

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):

#include<algorithm>

#include <numeric>
using namespace std;

int main(){
    int n;
    int max_s=0;
    int sum_s=0;
    int L;

    cin>>n;
    for (int i=0;i<n;i++){
        cin>>L;
        sum_s+=L;
        max_s=max(max_s,L);
    }  	
	if (max_s<sum_s-max_s){
    cout<<"Yes"<<endl;
    }else{
    cout<<"No"<<endl;
    }
    return 0;
}


n=int(input())
l=sort(map(int,input().split()))
print(["No","Yes"][l[-1]>=sum(l)-l[-1]])

n=int(input())
l=sorted(map(int,input().split()))
print(["No","Yes"][l[-1]<sum(l)-l[-1]])

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L =  input().split()
sum_len = 0

L_i = [int(s) for s in L]
print(L_i)
L_i.sort()

for i in range(N-1):
    sum_len = sum_len + int(L_i[i])

if sum_len > int(L_i[N-1]):
    print('Yes')
else :
    print('No')

N = int(input())
L =  input().split()
sum_len = 0

L_i = [int(s) for s in L]
L_i.sort()

for i in range(N-1):
    sum_len = sum_len + int(L_i[i])

if sum_len > int(L_i[N-1]):
    print('Yes')
else :
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
s = [int(input()).split() for i range(n)]
print( 'Yes' if max(s) < sum(s)-max(s) else 'No')


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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# coding: utf-8
# Your code here!
n = int(input())
l = list(map(int, input().split()))
m = sum(l)
a = 0
for i in range(n):
    if l[i] >= m - l[i]:
        print("NO")
        a = 1
        break
if a == 0:
    print("YES")

# coding: utf-8
# Your code here!
n = int(input())
l = list(map(int, input().split()))
m = sum(l)
a = 0
for i in range(n):
    if l[i] >= m - l[i]:
        print("No")
        a = 1
        break
if a == 0:
    print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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')

n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr)
total=sum(arr[:-1])
if arr[-1]<total:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
l = list(map(int, input().split()))
l.sort()
cnt = 0
for i in l[:n - 1]:
    cnt += 1
    #print(i)
if cnt > l[n - 1]:
    print("Yes")
else:
    print("No")
    

n = int(input())
l = list(map(int, input().split()))
l.sort()
cnt = 0
for i in l[:n - 1]:
    cnt += i
    #print(i)
if cnt > l[n - 1]:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

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

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



N = int(input())
a = [int(input()) for i in range(N)]

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



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

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



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

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


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

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


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
# -*- 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')


# -*- 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]

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
l = list(map(int,input().split()))
if max(l) < sum(l)-max(l):
    print("YES")
else:
    print("NO")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L_list = list(map(int, input().split()))

m = max(L_list)
result = 'yes' if sum(L_list) - m > m else 'no'
print(result)

N = int(input())
L_list = list(map(int, input().split()))
 
m = max(L_list)
result = 'Yes' if sum(L_list) - m > m else 'No'
print(result)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
li = list(map(int,input().split()))

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

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

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = map(int, input().split())
L = map(int, input().split())

max_length = max(L)

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

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

max_length = max(L)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)

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)

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

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

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

def judge(n,l):
    for i in range(n):
        s = 0
        for j in range(n):
            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)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L = list(map(int,input().split()))
if max(L) * 2 < L:
    print("Yes")
else:
    print("No")

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L_ls = [int(i) for i in input().split()]
print(L_ls)
if sum(L_ls) - 2*max(L_ls) > 0:
  print("Yes")
else:
  print("No")

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

N = int(input())
L_ls = [int(i) for i in input().split()]
if sum(L_ls) - 2*max(L_ls) > 0:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
L=list(map(int,input().split()))
sum=0
max=0
for i in L:
    if i>max:
        sum+=max
        max=i
if max<sum:
    print("Yes")
else:
    print("No")

n=int(input())
L=list(map(int,input().split()))
sum=0
max=0
for i in L:
    if i>max:
        sum+=max
        max=i
    else:
        sum+=i
if max<sum:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# _*_ coding:utf-8 _*_



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


# _*_ coding:utf-8 _*_



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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")

N = int(input())
L = [int(s) for s in input().split(" ")]
max_L = 0
sum_L = 0
for l in L:
  if l > max_L:
    max_L = l
  sum_L += l
 
if sum_L - max_L > max_L:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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")

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

L2 = sorted(L)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N=int(input())
L=list(map(int,input().split()))
L=sorted(L)
if sum(L[:-1])>L:
  print('Yes')
else:
  print('No')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
input();s=map(int,input().split());print('YNeos'[sum(s)-max(s)*2<1::2])


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


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

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


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
number = int(input())

sides = [int(val) for val in input().split(' ')]

print(sum(sides))
print(max(sides))

number = int(input())

sides = [int(val) for val in input().split(' ')]

longest = max(sides)
all = sum(sides)

if longest < all - longest:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
10
1 8 10 5 8 12 34 100 11 3

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

L_sum = sum(L)

res = True
for l in L:
    if ((L_sum - l) <= l):
        res = False

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
a=[int(i) for i in input().split()]
b=sorted(a)
x=sum(b[-1:])
y=sum(b[:-1])
if y<x:
	print('Yes')
else:
	print('No')

n=int(input())
a=[int(i) for i in input().split()]
b=sorted(a)
x=sum(b[-1:])
y=sum(b[:-1])
if y>x:
	print('Yes')
else:
	print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
l = list(map(int,input().split()))
l.sort()
if sum(l[:n-2]) > l[n-1]:
    print("Yes")
else:
    print("No")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
l = list(map(int,input().split()))
flg = 0
for i in range(0, n):
    if l[i] < sum(l)-l[i]:
        pass
    else:
        flg = 1
if flg == 1:
    print('NO')
else:
    print('YES')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L = list(map(int,input().split()))
L.sort()
print("NYoe s"[1 if (sum(L) - L[-1] > L[-1]) else 0])

N = int(input())
L = list(map(int,input().split()))
L.sort()
print("NYoe s"[1 if (sum(L) - L[-1] > L[-1]) else 0::2])

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L = list(map(int, input().split()))
L.sort()

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a=int(input())
b=input().rstrip().split()
print(b)

a=int(input())
b=input().rstrip().split()
l=[]
for i in range(a):
  l.append(int(b[i]))
l.sort()
max = l[a-1]
SUM=sum(l[:a-1])

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L = input().split()
max = 0
total = 0
for i in range(N-1):
    if max < int(L[i]):
        max = int(L[i])
    else:
        pass
for i in range(N-1):
    total += int(L[i])
total = total - max

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

N = int(input())
L = input().split()
max = 0
total = 0
for i in range(N):
    if max < int(L[i]):
        max = int(L[i])
    else:
        pass
for i in range(N):
    total += int(L[i])
total = total - max

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
input()
lst = map(int, input().split())
print('Yes' if max(lst) < sum(lst) - max(lst) else 'No')

input()
a = sorted(list(map(int, input().split())))
print('Yes' if a[-1] < sum(a[:-1]) else 'No')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
input_angle = int(input())
input_length = input()

_length = input_length.split(' ')
length = [int(l) for l in _length]
length.sort()
sum = 0

for i in range(input_angle-1):
  sum += int(length[i])
  
if int(length[-1]) < sum:
  print('Yes')
else:

input_angle = int(input())
input_length = input()

_length = input_length.split(' ')
length = [int(l) for l in _length]
length.sort()
sum = 0

for i in range(input_angle-2):
  sum += int(length[i])
  
if int(length[-1]) < sum:
  print('Yes')
else:
  print('No')

input_angle = int(input())
input_length = int(input())

length = input_length.split(' ')
length.sort()
sum = 0

for i in range(input_angle-1):
  sum += length[i]
  
if sum > length[-1]:
  print('Yes')
else:
  print('No')

input_angle = int(input())
input_length = input()

_length = input_length.split(' ')
length = [int(l) for l in _length]
length.sort()
sum = 0

for i in range(input_angle-1):
  sum += int(length[i])
  
if int(length[-1]) < sum:
  print('Yes')
else:

input_angle = int(input())
input_length = input()

_length = input_length.split(' ')
length = [int(l) for l in _length]
length.sort()
sum = 0

for i in range(input_angle-2):
  sum += int(length[i])
  
if int(length[-1]) < sum:
  print('Yes')
else:

input_angle = int(input())
input_length = input()

_length = input_length.split(' ')
length = [int(l) for l in _length]
length.sort()
sum = 0

for i in range(input_angle-1):
  sum += int(length[i])
  
if int(length[-1]) < sum:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a=input()
b=list(map(int,input().split()))
b.sort()
if sum(b)-max(b)-max(b)<=0:
  print("Yes")
else:
  print("No")

a=input()
b=list(map(int,input().split()))
b.sort()
if sum(b)-max(b)-max(b)<0:
  print("Yes")
else:
  print("No")

a=input()
b=list(map(int,input().split()))
b.sort()
if sum(b)-max(b)-max(b)>0:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L = [int(input()) for i in range(N)]
print("Yes" if max(L) < sum(L)-max(L) else "No")

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L = map(int, input().split())
x = sorted(L)
Lmax = max(L)
y = x[0:-1]
z = 0
for i in range(N-1):
    z = z + y[i]
print("Yes" if Lmax < z else "No")

N = input()
L = map(int, input().split())
x = sorted(L)
Lmax = max(L)
y = x[0:-1]
ysum = sum(y)
print("Yes" if Lmax < ysum else "No")


N = int(input())
L = map(int, input().split())
x = sorted(L)
Lmax = max(L)
y = x[0:-1]
ysum = sum(y)
print("Yes" if Lmax < ysum else "No")

N = int(input())
L = list(map(int, input().split()))
x = sorted(L)
Lmax = max(L)
y = x[0:-1]
ysum = sum(y)
print("Yes" if Lmax < ysum else "No")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
N = int(input())
L = map(int, input().split())
if max(L) * 2 < Sum(L):
  print("Yes")
else:
  print("No")

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")

# -*- coding: utf-8 -*-


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("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")

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-1]:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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")

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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()

N = input()
lst = input().split(" ")
list(map(int, lst))
max  = max(lst)
sum = sum(lst)
if sum - max < max:
    print("YES")
else:
    print("NO")


N = input()
lst = input().split(" ")
max  = max(lst)
sum = sum(lst)
if sum - max < max:
  print("YES")
else:
  print("NO")

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

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

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

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)
#print(max)
sum = sum(lst2)
#print(sum)
if sum - max > max:
    print("Yes")
else:
    print("No")
#input()

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted