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):
n = int(input())
L = map(int,input().split())
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())
print('Yes' if max(l)*2< sum(l) else 'No')


input()
L=list(map(int,input().split()))
print("Yes" if sum(L)>2*max(L) 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):
def read():
    N = int(input().strip())
    L = map(int, input().strip().split())
    return N, L


def solve(N, L):
    L = sorted(L)
    return "Yes" if L[-1] < sum(L[:-1]) else "No"


if __name__ == '__main__':
    inputs = read()
    print("%f" % solve(*inputs))


def read():
    N = int(input().strip())
    L = map(int, input().strip().split())
    return N, L


def solve(N, L):
    L = sorted(L)
    return "Yes" if L[-1] < sum(L[:-1]) else "No"


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))


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 = input()
EdgeLength=input()
edgeLength=[int(i) for i in EdgeLength]
N = int(n)

sorted(edgeLength)

sumL = 0
sumLength = [sumL += edgeLength[i] for i in range(N-1)]

if edgeLength[N] < sumL:
    print("Yes")
else:
    print("No")

EdgeLength=input()
edgeLength=[int(i) for i in EdgeLength]

sorted.edgeLength()

sumL = 0
sumLength = [sumL += edgeLength[i] for i in range(1,len(edgeLength))]

if edgeLength[0] < sumL:
    print("Yes")
else:
    print("No")


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]


    #sumL += edgeLength[i]


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

n = input()
EdgeLength=input()
edgeLength=[int(i) for i in EdgeLength]
N = int(n)

sorted.edgeLength()

sumL = 0
sumLength = [sumL += edgeLength[i] for i in range(1,N)]

if edgeLength[0] < sumL:
    print("Yes")
else:
    print("No")

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]
#print(sumL)


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


Verdicts: Runtime Error

Runtime Error

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):
import numpy as np

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

max_value = np.max(L)
sum_value = np.sum(L)
print("YES" if sum_value > 2 * max_value else "NO")


import numpy as np

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

max_value = np.max(L)
sum_value = np.sum(L)
print("Yes" if sum_value > 2 * max_value 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):

polynum = int(input())
length = list(map(int,input().split()))


most_l = max(length)
othersum = sum(length) - most_l
print(most_l)
print(othersum)
if othersum > most_l:
    print("Yes")
else:
    print("No")


polynum = int(input())
length = list(map(int,input().split()))


most_l = max(length)
othersum = sum(length) - most_l
if othersum > most_l:
    print("Yes")
else:
    print("No")

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, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

N = INT()
L = LIST()

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

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

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

N = INT()
L = LIST()

tmp = max(L)
L.remove(tmp)
if tmp < sum(L):
	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 = input()
l = [int(i) for i in input().split()] 

max_val = max(l)
sum_val = 0

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

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


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

a = input()

print(a)

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

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

lm = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]

ls = -1 * lm
for i in range(0, n):
  ls = ls + l[i]

if lm < ls:
  print("Yes")
else:
  print("No")

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

lm = 0
ls = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]
  ls = ls + l[i]
ls = ls - lm

if lm < ls:
  print("Yes")
else:
  print("No")


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

n = len(l)

lm = 0
ls = 0
for i in range(0, n):
  if lm < l[i]:
    lm = l[i]
  ls = ls + l[i]
ls = ls - lm

if lm < ls:
  print("Yes")
else:
  print("No")

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

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

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

if max(L) < sum(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 = [int(input()) for _ in range(N)]

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: 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()))
maxlen = max(l)
l.remove(maxlen)
s = 0

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

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

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

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

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

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

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

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

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

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

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

Verdicts: 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):
10
1 8 10 5 8 12 34 100 11 3

import sys
input = sys.stdin.buffer.readline

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

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

import sys
input = sys.stdin.buffer.readline

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

if max(A) < sum(A) - max(A):
    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):
if int(kaku) != len(s_list):
    print('No')
else:
    hen_list = [int(x) for x in s_list]

    m = max(hen_list)
    total = sum(hen_list)
    print(m, total)

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



kaku = input()
s_list = input().split(' ')
if not int(kaku) == len(s_list):
    print('No')
else:
    hen_list = [int(x) for x in s_list]
    m = max(hen_list)
    total = sum(hen_list)
    if m < total - m:
            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):
input()
l = list(map(int, input().split())).sort(reverse = True)
print('Yes' if l[0] < sum(l[1:]) else 'No')

input()
l = list(map(int, input().split()))
l.sort(reverse = True)
print('Yes' if l[0] < sum(l[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):
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: 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()))
M = max(L)
L.remove(M)
i = 0
for j in L:
    j += i
if j > M:
    print("Yes")
else:
    print("No")


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


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


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


Verdicts: 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):
n = int(input())
p = [int(input()) for i in range(n)]
p = sorted(p)
if p[0] < sum(p[1:]):
	print('Yes')
else:
	print('No')

n = int(input())
p = list(map(int, input().split(' ')))
p = sorted(p, reverse=True)
if p[0] < sum(p[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 = sorted([int(i) for i in input().split()])
if l[-1] < sum(l-l[-1]):
    print("Yes")
else:
    print("No")

n = int(input())
l = sorted([int(i) for i in input().split()])
if l[-1] < sum(l)-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())
li = list(map(int,input().split()))
Ma = max(li)
li.pop(Ma)
if Ma >= sum(li):
    print("No")
else:
    print("Yes")

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

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):
corners = input()
sides = list(map(int, input().split))
sides = sorted(sides)
for i in (corners-1):
    nums += sides[i+1]
if nums > sides[0]:
    print("Yes")
else:
    print("No")

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

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

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):
import sys

def main():
    """ Code implementation """
    N = int(input())
    L = list(map(int, input().split()))
    longest = 0
    sum = 0
    for l in L:
        sum = sum + l
        if longest < l:
            longest = l
        
    if longest < (sum - longest):
        print("YES")
    else:
        print("NO")

if __name__ == '__main__':
    main()


import sys

def main():
    """ Code implementation """
    N = int(input())
    L = list(map(int, input().split()))
    longest = 0
    sum = 0
    for l in L:
        sum = sum + l
        if longest < l:
            longest = l
        
    if longest < (sum - longest):
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()


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 numpy as np

n = int(input())
len_box = []
for _ in input().split():
    len_box.append(int(_))
len_box = np.array(len_box)
len_max = np.max(len_box)
len_sum = np.sum(len_box)
if (len_sum-len_max) > len_max:
    print("yes")
else:
    print("No")

import numpy as np

n = int(input())
len_box = []
for _ in input().split():
    len_box.append(int(_))
len_box = np.array(len_box)
len_max = np.max(len_box)
len_sum = np.sum(len_box)
if (len_sum-len_max) > len_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 = list(map(int, input().split()))
print("YES" if max(L)*2<sum(L) else "NO")

N = int(input())
L = list(map(int, input().split()))
print("Yes" if max(L)*2<sum(L) 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):
def actual(n, L):
    max_l = max(L)
    others_l = sum(L) - max_l

    if max_l < others_l:
        return 'Yes'

    return 'No'

n = int(input())
L = map(int, input().split())
print(actual(n, L))

def actual(n, L):
    max_l = max(L)
    others_l = sum(L) - max_l

    if max_l < others_l:
        return 'Yes'

    return 'No'

n = int(input())
L = list(map(int, input().split()))
print(actual(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):
_ = input()
edges = list(int, input().split())
max_edge = max(edges)
print('Yes' if max_edge < sum(edges) - max_edge else 'No')

_ = input()
edges = list(map(int, input().split()))
max_edge = max(edges)
print('Yes' if max_edge < sum(edges) - max_edge 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 = [int(i) for i in input().split()]
l = sorted(l)
m = l.pop(len(l)-1)
if m <= sum(l):
  print("No")
else:
  print("Yes")

n = int(input())
l = [int(i) for i in input().split()]
l = sorted(l)
m = l.pop(len(l)-1)
if m >= sum(l):
  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 = input()
l = sorted(list(map(int, input().split())))
max_l = l[-1]
if sum(max_l[:-1]) > l[-1]:
  print("Yes")
else:
  print("No")

n = input()
l = sorted(list(map(int, input().split())))
max_l = l[-1]
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()))
s = 0
for i in L:
    s += i
s -= max(L)
if L < s:
    print("Yes")
else:
    print("No")

N = int(input())
L = list(map(int,input().split()))
s = 0
for i in L:
    s += i
s -= max(L)
if max(L) < s:
    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 numpy as np
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
b=np.array(a)
if b[0]<b[1:].sum():
  print('yes')
else:
  print('No')

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

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):
#! /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")


#! /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")


#! /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")


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

N = int(input())
Llist = [int(x) for x in input().split()]
Llist.sort()
Llist.reverse()
if sum(Llist) > 2*Llist[0]:
    print("Yes")
else:
    print("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())
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")

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

print("Yes" if max(li) < sum(li) - max(li) 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())

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: 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(i) for i in input().split())  
L = [int(i) for i in input().split()] 
mx = max(L)
S = sum(L)

if mx < S-mx:
    print("yes")
else:
    print("no")

N = (int(i) for i in input().split())  
L = [int(i) for i in input().split()] 
mx = max(L)
S = sum(L)

if mx < S-mx:
    print("Yes")
else:
    print("No")

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()
n = [int(i) for i in input().split()]
print("YNeos"[0<sum(n)-max(n)*2::2])

_ = input()
n = [int(i) for i in input().split()]
print("YNeos"[0>=sum(n)-max(n)*2::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())
s = []
for i in range(n):
  s.append(int(input()))
if max(s)<sum(s)-max(s):
  print("Yes")
else:
  print("No")

n = int(input())
s = list(map(int,input().split()))
if max(s)<sum(s)-max(s):
  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())
table = [int(x) for x in input().split()]

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

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

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

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


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

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

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 = list(map(int,input().split()))
l.sort(reverse = True)
if l[0] > sum(l[1:n]):
    print('Yes')
else:
    print('No')

n = int(input())
l = list(map(int,input().split()))
l.sort(reverse = True)
if l[0] < sum(l[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 = list(input())
max_N = max(N)

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

Q = int(input())
N = list(map(int, input().split()))
max_N = max(N)

if max_N < sum(N)-max_N :
  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()))

print ("Yes" if max(L) < sum(L) - 2 * 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: 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
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
L = list(map(int, readline().split()))
S = sum(L)
ans = True
for i in L:
    if S >= i+i:
        ans = False
        break

print('Yes' if ans else 'No')




import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
L = list(map(int, readline().split()))
Lm=max(L)
S = sum(L)
ans = True

print('Yes' if S>2*Lm 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()))
if 2* max(s) < 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):
n = int(input())
l - list(map(int,input().split()))
if max(l)>= sum(l)-2*max(l):
  print("No")
else:
  print("Yes")

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


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


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

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

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()))
ans="Yes"
for i in l:
  if i>=sum(L)-i:
    ans="No"
print(ans)

n=input()
l=list(map(int,input().split()))
l.sort()
if l[-1]<sum(l)-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):
# -*- 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))

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


N = int(input())

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

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


N = int(input())

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

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

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

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


N = int(input())

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

Verdicts: 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):
# 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')

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

# the number of inputs
N = int(input())
# each length of edges
Ls= list(map(int, input().split()))

# searching largest one
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')

# the number of inputs
N = int(input())
# each length of edges
Ls= list(map(int, input().split()))

# searching largest one
largestL = 0
largestIndex = 0

# straightforward way
for i in range(N):
  if Ls[i] > largestL:
    largestL = Ls[i]
    largestIndex = i
print(largestL)
sumOfSmallLs = 0
for i in range(N):
  if i != largestIndex:
    sumOfSmallLs += Ls[i]

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


# the number of inputs
N = int(input())
# each length of edges
Ls= list(map(int, input().split()))

# searching largest one
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')


Verdicts: Runtime Error

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):
n=int(input())
line=list(map(int,input().split()))
border=sum(line)/2

flag=True
for i in line:
  if i >= border:
    flag=False
    break

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

n=int(input())
line=list(map(int,input().split()))
border=sum(line)/2
 
flag=True
for i in line:
  if i >= border:
    flag=False
    break
 
if flag:
  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 = 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")
  

n = input()
 
l = list(map(int, input().split()))
 
l.sort(reverse=True)
 
total = sum(l)
 
if (total - 2 * l[0] > 0 ) :
  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 = list(map(int, input().split()))

max_ = max(L_list)
L_list.remove(max_)

if max_ < np.sum(L_list):
    print("Yes")
else:
    print("No")

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

max_ = max(L_list)
L_list.remove(max_)

if max_ < np.sum(L_list):
    print("Yes")
else:
    print("No")

import numpy as np
N = int(input())
L_list = list(map(int, input().split()))

max_ = max(L_list)
L_list.remove(max_)

if max_ < np.sum(L_list):
    print("Yes")
else:
    print("No")

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,*L = map(int,open(0).read().split())
L.sort()
if sum(L[::-2]) < L[-1]:
    print("Yes")
else:
    print("No")

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

N = int(input())
L = list(map(int,input().split()))
L.sort()
if sum(L[:-1]) > L[-1]:
    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())
ls_l = map(int, input().split())

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

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


if (2 * max(ls_l)) < sum(ls_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):
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')
}


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



s1=input()
s2=input().split()
n2=[int(i) for i in s2]
a=sorted(n2,reverse=True)

max=a[0]
cnt=a[1:]
all=sum(cnt)

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

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

cur_longest = 0
sum_others = 0

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

print(cur_longest, sum_others)

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



n = int(input())
ls = map(int, input().split())

cur_longest = 0
sum_others = 0

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

print(cur_longest, sum_others)

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



n = int(input())
ls = map(int, input().split())

cur_longest = 0
sum_others = 0

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

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



Verdicts: Wrong Answer

Wrong Answer

Accepted