ZhenlongDai/ACPR huggingface dataset:
Problem: p02721
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
def main():
    input = stdin.readline
    n, k, c = map(int, input().split())
    s = input()

    ans = ""
    for i in range(n):
        if s[i] == "x":
            continue

        cur = 0
        count = 0
        ss = s[cur]

        while cur < n:
            if ss == "o" and cur != i:
                count += 1
                cur += c

            cur += 1

            if count >= k:
                break

        if count < k:
            ans+=str(i+1)+"\n"

    print(ans)

if __name__ == '__main__':
    main()

Failing test case input:
5 2 1
ooxno

Expected output:
5


Actual output:

Fixed submission (verdict: Accepted):
from sys import stdin
def main():
    input = stdin.readline
    n, k, c = map(int, input().split())
    s = input()

    l, r = [], []
    cur = 0
    count = 0

    while cur <= n:
        if s[cur] == "o":
            count += 1
            l.append((count, cur+1))
            cur += c

        cur += 1

    cur = n
    count = k

    while cur >= 0:
        if s[cur] == "o":
            r.append((count, cur+1))
            count -= 1
            cur -= c

        cur -= 1

    ans = (i[1] for i in set(l) & set(r))
    for i in sorted(ans):
        print(i)


if __name__ == '__main__':
    main()

Problem: p02721
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10**9)
N,K,C = map(int,input().split())
S = input()

i=0
forward = set()
while N>i and len(forward) < K:
    if S[i] == "o":
        forward.add(i)
        i+=C+1
    else:
        i+=1

i=N-1
backward = set()
while i>=0 and len(backward) < K:
    if S[i] == "o":
        backward.add(i)
        i-=C+1
    else:
        i-=1
    

isect = forward&backward
for i in isect:
    print(i+1)
if len(isect) == 0:
    print()

Failing test case input:
16 4 3
ooxxoxnyxxoxoxwo

Expected output:
1
5
11
16


Actual output:
1
11
5
16


Fixed submission (verdict: Accepted):
import sys
sys.setrecursionlimit(10**9)
N,K,C = map(int,input().split())
S = input()

i=0
forward = set()
while N>i:
    if S[i] == "o":
        forward.add(i)
        i+=C+1
    else:
        i+=1

if len(forward) != K:
    exit()

i=N-1
backward = set()
while i>=0:
    if S[i] == "o":
        backward.add(i)
        i-=C+1
    else:
        i-=1
    

isect = list(forward&backward)
for i in sorted(isect):
    print(i+1)
Problem: p02721
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,k,c = map(int,input().split())
sl = list(input())


ansl = []
before = -float("inf")
for idx,s in enumerate(sl):
    if s == "o" and before + c < idx:
        before = idx
        ansl.append(idx)

if len(ansl) > k:
    print()
    exit()

ansl2 = []
before = -float("inf")
for idx,s in enumerate(sl[::-1]):
    if s == "o" and before + c < idx:
        before = idx
        ansl2.append(n-idx-1)

for a in list(set(ansl) & set(ansl2)):
    print(a+1)

Failing test case input:
11 3 1
ooxxxonwxox

Expected output:
6
10


Actual output:
10
6


Fixed submission (verdict: Accepted):
n,k,c = map(int,input().split())
sl = list(input())


ansl = []
before = -float("inf")
for idx,s in enumerate(sl):
    if s == "o" and before + c < idx:
        before = idx
        ansl.append(idx)


ansl2 = []
before = -float("inf")
for idx,s in enumerate(sl[::-1]):
    if s == "o" and before + c < idx:
        before = idx
        ansl2.append(n-idx-1)


for a1,a2 in zip(ansl[:k], ansl2[:k][::-1]):
    if a1 == a2:
        print(a1+1)

Problem: p02721
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,K,C= map(int,input().split())
S = input()
T = [n for n, v in enumerate(S) if v == "o"]

a,b=[T[0]],[T[-1]]

for i in range(len(T)):
  if len(a)!=K:
    if T[i]-a[-1]>C:
      a.append(T[i])
  if len(b)!=K:
    if b[0]-T[-i-1]>C:
      b.append(T[-i-1])
      
for i in range(K):
  if a[i]==b[-i-1]:
    print(a[i]+1)
  

Failing test case input:
16 4 3
oxxoxoxxxoxoxxoo

Expected output:
1
6


Actual output:

Fixed submission (verdict: Accepted):
N,K,C= map(int,input().split())
S = input()
T = [n for n, v in enumerate(S) if v == "o"]

a,b=[T[0]],[T[-1]]

for i in range(len(T)):
  if len(a)!=K:
    if T[i]-a[-1]>C:
      a.append(T[i])
  if len(b)!=K:
    if b[-1]-T[-i-1]>C:
      b.append(T[-i-1])
      
for i in range(K):
  if a[i]==b[-i-1]:
    print(a[i]+1)

Problem: p02721
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K, C = map(int,input().split())
S = list(input())

def solve(List):
    ans = []
    i = 0
    while i < N:
        if List[i] == 'o':
            ans.append(i+1)
            i += C
        i += 1
    return ans

n = solve(S)

if len(n) > K:
    pass
else:
    r = solve(S[::-1])
    r = list(map(lambda x: N+1-x, r[::-1]))
    ans = list(set(n) & set(r))
    for i in ans:
        print(i)

Failing test case input:
11 3 2
xooxxyovpox

Expected output:
7
10


Actual output:
10
7


Fixed submission (verdict: Accepted):
N, K, C = map(int,input().split())
S = list(input())

def solve(List):
    ans = []
    i = 0
    while i < N:
        if List[i] == 'o':
            ans.append(i+1)
            i += C
        i += 1
    return ans

n = solve(S)

if len(n) > K:
    pass
else:
    r = solve(S[::-1])
    r = list(map(lambda x: N+1-x, r[::-1]))
    ans = list(set(n) & set(r))
    ans.sort()
    for i in ans:
        print(i)
Problem: p02721
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,K,C = map(int,input().split())
S = input()
L = []
R = []
i = 0
while i < N:
    if S[i] == "o":
        L.append(i)
        if len(L) == K:
            break
        i += C
    else:
        i += 1
i = N-1
while i >= 0:
    if S[i] == "o":
        R.append(i)
        if len(R) == K:
            break
        i -= C
    else:
        i -= 1
R.reverse()
for i in range(K):
    if L[i] == R[i]:
        print(L[i]+1)

Failing test case input:
11 3 1
woxwooxxxno

Expected output:
2
11


Actual output:

Fixed submission (verdict: Accepted):
N,K,C = map(int,input().split())
S = input()
L = []
R = []
i = 0
while i < N:
    if S[i] == "o":
        L.append(i)
        if len(L) == K:
            break
        i += C+1
    else:
        i += 1
i = N-1
while i >= 0:
    if S[i] == "o":
        R.append(i)
        if len(R) == K:
            break
        i -= C+1
    else:
        i -= 1
R.reverse()
for i in range(K):
    if L[i] == R[i]:
        print(L[i]+1)

Problem: p02721
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



n,k,c = list(map(int, input().split()))
s = list(input())

early = []
late = []

i = 0
while i <= n-1:
    if s[i] == "o":
        early.append(i)
        i = i+c+1
    else:
        i = i+1

i = n-1
while i >= 0:
    if s[i] == "o":
        late.append(i)
        i = i-c-1
    else:
        i = i-1

early = set(early)
late = set(late)

for index in early:
    if index in late:
        print(index+1)

Failing test case input:
11 3 1
onxxxonwxox

Expected output:
1
6
10


Actual output:
1
10
6


Fixed submission (verdict: Accepted):



n,k,c = list(map(int, input().split()))
s = list(input())

early = []
late = []

i = 0
count = 0
while i < n and count < k:
    if s[i] == "o":
        early.append(i)
        i = i+c+1
        count = count+1
    else:
        i = i+1


i = n-1
count = 0
while i > -1 and count < k:
    if s[i] == "o":
        late.append(i)
        i = i-c-1
        count = count+1
    else:
        i = i-1

for i in range(len(early)):
    if early[i] == late[k-i-1]:
        print(early[i]+1)

Problem: p02721
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K,C = map(int,input().split())
S = input()

L = []
R = []

i = 0
while i < N:
    if S[i] == "o":
        L.append(i)
        i += C
    i += 1

j = N-1
while j >= 0:
    if S[j] == "o":
        R.append(j)
        j -= C
    j -= 1   

for i in range(K):
    if L[i] == R[K-1-i]:
        print(L[i]+1)
        exit()
        

Failing test case input:
11 3 1
xoxwnoxxxno

Expected output:
2
6
11


Actual output:
2


Fixed submission (verdict: Accepted):
N,K,C = map(int,input().split())
S = input()

L = []
R = []

i = 0
while i < N:
    if S[i] == "o":
        L.append(i)
        i += C
    i += 1

j = N-1
while j >= 0:
    if S[j] == "o":
        R.append(j)
        j -= C
    j -= 1   

for i in range(K):
    if L[i] == R[K-1-i]:
        print(L[i]+1)
Problem: p02721
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K, C = map(int, input().split())
S = input()

L = []
R = []
holiday = 0

for i in range(N):
  if holiday:
    holiday -= 1
  elif S[i] == 'o':
    L.append(i)
    holiday = C
holiday = 0
for i in range(N-1, -1, -1):
  if holiday:
    holiday -= 1
  elif S[i] == 'o':
    R.append(i)
    holiday = C
out = set(L) and set(R)
if len(L) >= K and len(R) >= K:
  for n in out:
    print(n+1)

Failing test case input:
16 4 3
ooxwoxoxxyoxxxoo

Expected output:
11


Actual output:
2
11
7
16


Fixed submission (verdict: Accepted):
N, K, C = map(int, input().split())
S = input()

L = []
R = []
holiday = 0

for i in range(N):
  if holiday:
    holiday -= 1
  elif S[i] == 'o':
    L.append(i)
    holiday = C
holiday = 0
for i in range(N-1, -1, -1):
  if holiday:
    holiday -= 1
  elif S[i] == 'o':
    R.append(i)
    holiday = C
R = R[::-1]
out = set(L) and set(R)
if len(L) == K:
  for l, r in zip(L, R):
    if l == r: print(l+1)

Problem: p02721
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k,c=map(int,input().split())
s=input()
l=set();r=set()
nex=0
for i in range(n):
	if i<nex:
		continue
	if s[i]=="o":
		nex=i+c+1
		l.add(i)
nex=-1
for i in range(n):
	if i<nex:
		continue
	if s[-i-1]=="o":
		nex=i+c+1
		r.add(n-i-1)
K=list(l&r)
if len(K)>k:
	print()
	exit()
for x in K:
	print(x+1)

Failing test case input:
11 3 1
ooyxxpovxox

Expected output:
7
10


Actual output:
10
7


Fixed submission (verdict: Accepted):
n,k,c=map(int,input().split())
s=input()
l=list();r=list()
nex=0
for i in range(n):
	if i<nex:
		continue
	if s[i]=="o":
		nex=i+c+1
		l.append(i)
		if len(l)==k:
			break
nex=-1
for i in range(n):
	if i<nex:
		continue
	if s[-i-1]=="o":
		nex=i+c+1
		r.append(n-i-1)
		if len(r)==k:
			break
r=r[::-1]
for i in range(k):
	if l[i]==r[i]:
		print(l[i]+1)

Problem: p02721
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k,c=[int(x) for x in input().split()]
s=list(input())

L=[]
R=[]

i=0
while i < n:  
    if s[i]=="o":
        L.append(i)
        i+=c
    i+=1

i=0
while i < n:
    if s[n-i-1]=="o":
        R.append(n-i-1)
        i+=c
    i+=1
print(L,R)

days=[]
for i in range(k):
    if L[i]==R[i]:
        days.append(L[i])


for i in range(len(days)):
    print(days[i]+1)

Failing test case input:
11 3 1
xoxwoowoxnx

Expected output:
2
8


Actual output:
[1, 4, 7] [7, 5, 1]


Fixed submission (verdict: Accepted):
n,k,c=[int(x) for x in input().split()]
s=list(input())

L=[]
R=[]

i=0
while i < n:  
    if s[i]=="o":
        L.append(i)
        i+=c
    i+=1

i=0
while i < n:
    if s[n-i-1]=="o":
        R.append(n-i-1)
        i+=c
    i+=1
    
days=[]
for i in range(k):
    if L[i]==R[k-i-1]:
        days.append(L[i])


for i in range(len(days)):
    print(days[i]+1)
Problem: p02721
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k,c= map(int,input().split())
s = input()
i = 0

def func(s,k,c):
  i = 0
  res = []
  while 1:
    if s[i] == 'o':
      res.append(i)
      if len(res)== k:
        break
      i += c
    i+= 1
  return res
ans1 = set(func(s,k,c))
ans2 = set(func(s[::-1],k,c))

ans = list(ans1.intersection(ans2))
for a in ans:
  print(a+1)



Failing test case input:
11 3 1
ooxxxooxyvo

Expected output:
11


Actual output:
1


Fixed submission (verdict: Accepted):
n,k,c= map(int,input().split())
s = input()
i = 0

def func(s,k,c):
  i = 0
  res = []
  while 1:
    if s[i] == 'o':
      res.append(i)
      if len(res)== k:
        break
      i += c
    i+= 1
  return res
ans1 = func(s,k,c)
ans2 = func(s[::-1],k,c)
ans2 = [n-a-1 for a in ans2]
ans2 = ans2[::-1]

for i in range(k):
  if ans1[i]==ans2[i]:
    print(ans1[i]+1)

Problem: p02721
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N,K,C=map(int,input().split())
S=input()


maekara=[]
i=1
cnt=0
while i<=N and cnt<K:
    if S[i-1]!='x':
        maekara.append(i)
        i+=C+1
        cnt+=1
    else: i+=1

usirokara=[]
j=N
cnt=0
while j>=0 and cnt<K:
    if S[j-1]!='x':
        usirokara.append(j)
        j-=C+1
        cnt+=1
    else: j-=1


ans=set(maekara)&set(usirokara)
ans=sorted(list(ans))

for i in ans: print(i)

Failing test case input:
11 3 1
xoovoyxxpox

Expected output:
5
10


Actual output:
4
6


Fixed submission (verdict: Accepted):
N,K,C=map(int,input().split())
S=input()

maekara=[]
i=1
cnt=0
while i<=N and cnt<K:
    if S[i-1]=='o':
        maekara.append(i)
        i+=C+1
        cnt+=1
    else: i+=1

usirokara=[]
j=N
cnt=0
while j>=1 and cnt<K:
    if S[j-1]=='o':
        usirokara.append(j)
        j-=C+1
        cnt+=1
    else: j-=1
usirokara=usirokara[::-1]

for i in range(K):
    if maekara[i]==usirokara[i]:
        print(maekara[i])

Problem: p02721
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, K, C=map(int, input().split())
S=input()
A=set()
i=0
while len(A)<K:
  if S[i]=='o':
    A.add(i)
    i+=C+1
  else:
    i+=1
    
B=set()
i=-1
while len(B)<K:
  if S[i]=='o':
    B.add(N+i)
    i-=(C+1)
  else:
    i-=1
    
A=list(A)
for i in A:
  if i in B:
    print(i+1)

Failing test case input:
11 3 1
ooyxwpovxox

Expected output:
7
10


Actual output:
10
7


Fixed submission (verdict: Accepted):
N, K, C=map(int, input().split())
S=input()

A=[]
i=0
while len(A)<K:
  if S[i]=='o':
    A.append(i+1)
    i+=(C+1)
  else:
    i+=1
    
B=[]
i=-1
while len(B)<K:
  if S[i]=='o':
    B.append(i)
    i-=(C+1)
  else:
    i-=1
    
B=[N+i+1 for i in B]
B=B[::-1]
for i in range(K):
  if A[i]==B[i]:
    print(A[i])
Problem: p02721
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,k,c = map(int,input().split())
sl = list(input())


ansl = []
before = -float("inf")
for idx,s in enumerate(sl):
    if s == "o" and before + c < idx:
        before = idx
        ansl.append(idx)


ansl2 = []
before = -float("inf")
for idx,s in enumerate(sl[::-1]):
    if s == "o" and before + c < idx:
        before = idx
        ansl2.append(n-idx-1)

for a1,a2 in zip(ansl[:k], ansl2[::-1][:k]):
    if a1 == a2:
        print(a1)


Failing test case input:
16 4 3
ooxxoxnyxxoxoxwo

Expected output:
1
5
11
16


Actual output:
0
4
10
15


Fixed submission (verdict: Accepted):
n,k,c = map(int,input().split())
sl = list(input())


ansl = []
before = -float("inf")
for idx,s in enumerate(sl):
    if s == "o" and before + c < idx:
        before = idx
        ansl.append(idx)


ansl2 = []
before = -float("inf")
for idx,s in enumerate(sl[::-1]):
    if s == "o" and before + c < idx:
        before = idx
        ansl2.append(n-idx-1)


for a1,a2 in zip(ansl[:k], ansl2[:k][::-1]):
    if a1 == a2:
        print(a1+1)
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
i_list = list(map(int,input().split()))
i_list.sort

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

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

Failing test case input:
4
10 1 1 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
i_list = list(map(int,input().split()))
i_list = sorted(i_list)

line_sum = 0
for i in i_list:
  line_sum += i

if max(i_list) < line_sum - max(i_list):
  print("Yes")
else:
  print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = int(input())
A = list(map(int, input().split())) 
m = max(A)
if sum(A) - int(m) > int(m):
    print("Yes")
else:
    print("NO")

Failing test case input:
4
2 0 2 -1

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
s = int(input())
A = list(map(int, input().split())) 
m = max(A)
if sum(A) - int(m) > int(m):
    print("Yes")
elif sum(A) - int(m) <= int(m):
    print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
10
1 8 10 5 8 12 34 100 11 3

Expected output:
No

Actual output:
no


Fixed submission (verdict: Accepted):
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)

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=list(map(int,input().split()))
L=max(l)
other=sum(l)-L
if other>=L:
  print('No')
else:
  print('Yes')

Failing test case input:
4
5 4 1 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n=int(input())
l=list(map(int,input().split()))
L=max(l)
other=sum(l)-L
if other<=L:
  print('No')
else:
  print('Yes')

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = map(int, input().split())
if max(L) * 2 < sum(L):
  print("Yes")
else:
  print("No")

Failing test case input:
4
6 6 1 0

Expected output:
Yes


Actual output:
No


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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
li = [int(x) for x in input().split()]
li.sort()
if sum(li[:-1]) < li[-1]:
  print("Yes")
else:
  print("No")

Failing test case input:
4
-5 0 8 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
li = [int(x) for x in input().split()]
li.sort()

if sum(li[:-1]) > li[-1]:
  print("Yes")
else:
  print("No")
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = list(map(int, input().split()))
count = 0
for i in range(N):
    if L[i] != max(L):
        count += L[i]
if count > max(L):
    print("Yes")
else:
    print("No")



Failing test case input:
4
6 6 1 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int, input().split()))
count = 0
idx = L.index(max(L))
for i in range(N):
    if i != idx:
        count += L[i]
if count > max(L):
    print("Yes")
else:
    print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = int(input())
l = list(map(int, input().split()))
max = l.pop(l.index(max(l)))
for i in range(len(l)):
    if max < l[i]:
        print('No')
        exit(0)
print('Yes')


Failing test case input:
4
2 0 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
num = int(input())
l = list(map(int, input().split()))
max = l.pop(l.index(max(l)))
sum = 0
for i in range(len(l)):
    sum = sum + l[i]
if sum <= max:
    print('No')
else:
    print('Yes')

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l = list(map(int, input().split()))
maxi = max(l)
l[l.index(max(l))]=0
tmp=0
for x in l:
    tmp+=x

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


Failing test case input:
4
-1 1 1 -1

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
n=int(input())
l = list(map(int, input().split()))
l.sort()
maxi=l[-1]
l[-1]=0
sum=0
for x in l:
    sum+=x

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, *l = map(int, open(0).read().split())

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

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

Failing test case input:
4
-5 0 8 -2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n, *l = map(int, open(0).read().split())

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

if max >= total:
    print('No')
else:
    print('Yes')

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
if 2 * max(l) - sum(l) > 0:
    print("No")
else:
    print("Yes")


Failing test case input:
4
1 1 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
if 2 * max(l) - sum(l) < 0:
    print("Yes")
else:
    print("No")
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
lst=list(map(int,input().split()))
lst.sort()
maxval=lst.pop(-1)
sumval=sum(lst)
sumval=sum(lst)
if maxval<sumval:
    print('YES')
else:
    print('NO')

Failing test case input:
4
-6 0 8 -2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n=int(input())
lst=list(map(int,input().split()))
maxval=max(lst)
sumval=sum(lst)
if maxval<sumval-maxval:
    print('Yes')
else:
    print('No')

Problem: p03136
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
L = list(map(int, input().split()))

L.sort()
L.reverse()

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


Failing test case input:
4
1 1 2 0

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int, input().split()))

L.sort()
L.reverse()

print("Yes" if sum(L) > int(2*L[0]) else "No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
if 2*L[0] > sum(L):
    print('Yes')
else:
    print('No')

Failing test case input:
4
3 6 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int, input().split()))
if max(l) < sum(l) - max(l):
    print('Yes')
else:
    print('No')

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())
b=list(map(int,input().split()))
if a<sum(b)-max(b):
  print('Yes')
else:
  print('No')

Failing test case input:
10
1 0 1 10 1 14 12 100 1 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a=int(input())
b=list(map(int,input().split()))

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
4
3 1 3 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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")
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



num = int(input())

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

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

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

Failing test case input:
4
4 1 4 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):



num = int(input())

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

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

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(x) for x in input().split()]

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

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

Failing test case input:
4
2 0 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(x) for x in input().split()]

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

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


index = int(input('input num : '))


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum < other - maximum:
    print("Yes")
else:
    print("No")


Failing test case input:
4
5 4 1 -1

Expected output:
No


Actual output:
input num : No


Fixed submission (verdict: Accepted):


index = int(input())


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum < other - maximum:
    print("Yes")
else:
    print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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

Failing test case input:
10
1 0 10 10 16 22 34 110 11 3

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
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)
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")


Failing test case input:
10
0 0 1 9 2 14 12 100 -1 1

Expected output:
No


Actual output:
0
0
1
9
2
14
12
100
-1
1
YES


Fixed submission (verdict: Accepted):
N = input()
lst = input().split(" ")
lst2 = []
for i in lst:
    int_i = int(i)
    
    lst2.append(int_i)

max  = max(lst2)

sum = sum(lst2)

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=list(map(int,input().split()))
a=sum(l)
ans='Yes'
for i in l:
  if a-i<i:
    ans='No'
print(ans)

Failing test case input:
4
1 1 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n=int(input())
l=list(map(int,input().split()))
a=sum(l)
ans='Yes'
for i in l:
  if a-i<=i:
    ans='No'
print(ans)

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = list(map(int, input().split()))

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

Failing test case input:
10
0 0 1 9 0 14 33 101 -1 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int, input().split()))

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
4
3 -9 -1 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
4
3 5 5 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
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")
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



N = int(input())


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





Failing test case input:
4
3 1 2 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):



N = int(input())


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



num = 0
for i in l:
    num=i+num
num = num-max


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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = list(map(int, input().split()))

M = max(l)
S = sum(l)

if M<S :
    s = 'Yes'
else:
    s = 'No'
    
print(s)

Failing test case input:
10
1 0 1 9 2 14 12 100 -1 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
l = list(map(int, input().split()))

M = max(l)
S = sum(l)

if M*2<S :
    s = 'Yes'
else:
    s = 'No'
    
print(s)

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
L=list(map(int,input().split()))

sum_=sum(L)
max_=max(L)
if(max_<sum_-max_):
    print(max_,sum_-max_)
    print('Yes')
else:
    print('No')

Failing test case input:
4
3 1 3 0

Expected output:
Yes


Actual output:
3 4
Yes


Fixed submission (verdict: Accepted):
N=int(input())
L=list(map(int,input().split()))

sum_=sum(L)
max_=max(L)
if(max_<sum_-max_):
    print('Yes')
else:
    print('No')

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
List = list(map(int, input().split()))
print("Yes" if max(List) <= sum(List)-max(List) else "No")

Failing test case input:
4
3 8 4 1

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
List = list(map(int, input().split()))
print("Yes" if max(List) < sum(List)-max(List) else "No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
point = list(map(int,input().split()))

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

Failing test case input:
10
1 0 1 5 1 14 12 100 0 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
point = list(map(int,input().split()))

M = max(point)

if M<(sum(point)-M):
  print("Yes")
else:
  print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input()
L=list(map(int,input().split()))
print("Yes" if sum(L)<max(L)*2 else "No")

Failing test case input:
4
-1 1 2 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
input()
L=list(map(int,input().split()))
print("Yes" if sum(L)>max(L)*2 else "No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = [int() for i in input().split()]
if 2*max(L) < sum(L):
    print('Yes')
else:
    print('No')

Failing test case input:
4
3 3 4 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
x = [int(i) for i in input().split()]
if 2*max(x)<sum(x): print("Yes")
else: print("No")
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
numN = int(input())
args = input()
 
lines = list()
 
 
for i in range(numN):
    if i == numN - 1 :
        lines.append(int(args))
        break

    lines.append(int(args[0:args.find(" ")]))
    args = args[args.find(" ") + 1 :]
 
list_sorted = sorted(lines, reverse = True)
max_line = list_sorted[0]
 
for m in range(numN - 1):
    max_line = max_line - list_sorted[m+1]

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

Failing test case input:
4
-5 0 8 -2

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
numN = int(input())
args = input()
 
lines = list()
 
 
for i in range(numN):
    if i == numN - 1 :
        lines.append(int(args))
        break

    lines.append(int(args[0:args.find(" ")]))
    args = args[args.find(" ") + 1 :]
 
list_sorted = sorted(lines, reverse = True)
max_line = list_sorted[0]
 
for m in range(numN - 1):
    max_line = max_line - list_sorted[m+1]

if max_line < 0 :
    print('Yes')
else:
    print('No')

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
l = list(map(int,input().split()))
max = max(l)
sum = sum(l)
if max < (sum -max) :
  print("yes")
else :
  print("no")

Failing test case input:
10
1 0 10 10 8 12 34 100 11 3

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
a = int(input())
l = list(map(int,input().split()))
max = max(l)
sum = sum(l)
if max < (sum -max) :
  print("Yes")
else :
  print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
4
6 1 1 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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)

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = input().split()
Lng=0
sumL=0
for i in range(N):
    if Lng<int(L[i]):
        sumL=Lng
        Lng=int(L[i])
    else:
        sumL=sumL+int(L[i])
if Lng<sumL:
    print("Yes")
else:
    print("No")


Failing test case input:
4
3 5 6 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
L = input().split()
Lng=0
sumL=0
for i in range(N):
    if Lng<int(L[i]):
        sumL=sumL+Lng
        Lng=int(L[i])
    else:
        sumL=sumL+int(L[i])
    
    
if Lng<sumL:
    print("Yes")
else:
    print("No")
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = list(map(int, input().split()))
l = [i for i in L if i != max(L)]
print('Yes' if max(L) < sum(l) else 'No')

Failing test case input:
4
3 1 3 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int, input().split()))
LM = max(L)
L.remove(LM)
print('Yes' if LM < sum(L) else 'No')

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
l=list(map(int,input().split()))
l_M=max(l)
if sum([i for i in l if i!=l_M])>l_M:
  print("Yes")
else:
  print("No")




Failing test case input:
4
6 6 1 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
l=list(map(int,input().split()))
l_M=max(l)
l=sorted(l)
l=l[0:n-1]
s=sum(l)
if s>l_M:
  print("Yes")
else:
  print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = input().split()
i = 0
while i < n:
  a[i] = int(a[i])
  i = i + 1 

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

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

Failing test case input:
10
1 8 10 5 8 12 34 100 11 3

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
a = input().split()
i = 0
while i < n:
  a[i] = int(a[i])
  i = i + 1 
 
i = 0
while i < n:
  j = i + 1
  while j < n:
    if a[i] < a[j]:
      temp = a[i]
      a[i] = a[j]
      a[j] = temp
    j = j + 1
  i = i + 1
 
sums = sum(a)

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
numN = int(input())
args = input()
 
lines = list()
 
 
for i in range(numN):
    if i == numN - 1 :
        lines.append(int(args))
        break

    lines.append(int(args[0:args.find(" ")]))
    args = args[args.find(" ") + 1 :]
 
list_sorted = sorted(lines, reverse = True)
max_line = list_sorted[0]
 
for m in range(numN - 1):
    max_line = max_line - list_sorted[m+1]

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

Failing test case input:
4
4 0 2 0

Expected output:
No


Actual output:
2
no


Fixed submission (verdict: Accepted):
numN = int(input())
args = input()
 
lines = list()
 
 
for i in range(numN):
    if i == numN - 1 :
        lines.append(int(args))
        break

    lines.append(int(args[0:args.find(" ")]))
    args = args[args.find(" ") + 1 :]
 
list_sorted = sorted(lines, reverse = True)
max_line = list_sorted[0]
 
for m in range(numN - 1):
    max_line = max_line - list_sorted[m+1]

if max_line < 0 :
    print('Yes')
else:
    print('No')
Problem: p03136
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = [int(i) for i in input().split()]

l.sort()
l.reverse()
cnt = 0
for i in range(n-1):
	cnt += l[i]
if cnt > l[n-1]:
	print("Yes")
else:
	print("No")


Failing test case input:
10
0 0 1 9 0 14 22 100 -1 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
l = [int(i) for i in input().split()]

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import functools

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

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

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

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



Failing test case input:
4
3 8 4 1

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
import functools

n = int(input())
l = list(map(lambda x: int(x), input().split()))
    
longest = functools.reduce(lambda x,y: x if x > y else y, l)
sum = functools.reduce(lambda x,y: x + y, l) - longest

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = [int(i) for i in input().split()]

L = sorted(L)

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


Failing test case input:
4
4 3 4 1

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
N = int(input())
L = [int(i) for i in input().split()]

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = list(map(int,input().split()))
if max(L) > (sum(L) - max(L)):
  print("Yes")
else:
  print("No")

Failing test case input:
10
1 0 1 9 2 14 12 100 -1 1

Expected output:
No


Actual output:
Yes


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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

L = []

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

saidai = max(L)

goukei  = sum(L)

goukei = goukei - saidai

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


Failing test case input:
4
1 0 2 -1

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
N = int(input())

L = []

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

saidai = max(L)

goukei  = sum(L)

goukei = goukei - saidai

if saidai < goukei:
    print("Yes")
else:
    print("No")
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = input().split(" ")
for i in range(len(l)):
    l[i] = int(l[i])

l.sort()
sum = 0
for i in range(1, n):
    sum += l[i]

if sum > l[0]:
    print("Yes")
else:
    print("No")


Failing test case input:
4
3 5 0 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
l = input().split(" ")
for i in range(len(l)):
    l[i] = int(l[i])

l.sort(reverse=True)
sum = 0
for i in range(1, n):
    sum += l[i]

if sum > l[0]:
    print("Yes")
else:
    print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=input()
a=list(map(int, input().split()))
if max(a)*2 >= sum(a):
    print("Yes")
else:
    print("No")

Failing test case input:
4
-1 1 2 -1

Expected output:
No


Actual output:
Yes


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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


index = int(input('input num : '))


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum >= tmp - maximum :
    print("Yes")
else:
    print("No")

Failing test case input:
4
-5 0 8 -2

Expected output:
No


Actual output:
input num : Yes


Fixed submission (verdict: Accepted):


index = int(input())


maximum = 0
other = 0
inputList = input().split()
for i in range(index):
    tmp = int(inputList[i])
    if tmp > maximum:
        maximum = tmp
        other = other + maximum
    else:
        other = other + tmp

if maximum < other - maximum:
    print("Yes")
else:
    print("No")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = input().split()

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

Length = 0
sum = 0
num = 0

for i in range(N):
    sum += L_i[i]
    
    if L_i[i] > Length:
        Length = L_i[i]
        num = i


if Length * 2 > sum:
    print("yes")
else:
    print("no")

Failing test case input:
4
12 -9 -2 -1

Expected output:
No


Actual output:
yes


Fixed submission (verdict: Accepted):
N = int(input())
L = input().split()

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

Length = 0
sum = 0
num = 0

for i in range(N):
    sum += L_i[i]

    if L_i[i] > Length:
        Length = L_i[i]
        num = i


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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')


Failing test case input:
10
1 0 0 10 16 14 12 110 6 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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')
Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = list(map(int, input().split()))
L.sort()
max_L = L[-1]
del L[-1]
if max_L > sum(L):
    print("Yes")
else:
    print("No")

Failing test case input:
10
0 0 1 9 2 14 12 100 -1 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int, input().split()))
L.sort()
max_L = L[-1]
del L[-1]
if max_L >= sum(L):
    print("No")
else:
    print("Yes")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
L = [int(i) for i in input().split()]
if N*2 < sum(L):
  print('Yes')
else:
  print('No')
  

Failing test case input:
10
0 0 1 10 0 14 33 001 -1 1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
_N = int(input())
L = [int(i) for i in input().split()]
L = sorted(L)
if L[-1] < sum(L[:-1]):
  print('Yes')
else:
  print('No')

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
l = list(map(int, input().split()))
cnt = 0
for i in l[:len(l) - 1]:
    cnt += 1
if cnt > l[len(l) - 1]:
    print("Yes")
else:
    print("No")

Failing test case input:
10
0 0 1 9 2 14 12 100 -1 1

Expected output:
No


Actual output:
Yes


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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
4
8 -5 -2 0

Expected output:
No


Actual output:
4 [-5, -2, 0, 8]
No


Fixed submission (verdict: Accepted):
N = int(input())
L = list(map(int, input().split()))

L2 = sorted(L)

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

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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



for i in range(n):
  if sum(ls[:i]) + sum(ls[i+1:]) - ls[i] < 0:
    print("No")
    quit()
print("Yes")

Failing test case input:
4
2 0 2 0

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

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



for i in range(n):
  if sum(ls[:i]) + sum(ls[i+1:]) - ls[i] <= 0:
    print("No")
    quit()
print("Yes")

Problem: p03136
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')



Failing test case input:
10
1 0 1 10 16 14 34 110 6 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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')