ZhenlongDai/ACPR huggingface dataset:
Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
C = [0] * 10000
def CountingSort(A, B, k):
    
    
    for j in range(0,k):
        C[A[j]]+=1
    
    
    for i in range(1,k+1):
        C[i] = C[i] + C[i-1]
    
    for j in range(k-1,-1,-1):
        B[C[A[j]]] = A[j]
        C[A[j]]-=1
        

n = int(input())
A = list(map(int,input().split()))
B = [0] * (n+1)
CountingSort(A,B,n)
print(' '.join(map(str,B[1:])))



Failing test case input:
7
6 5 1 0 12 3 3

Expected output:
0 1 3 3 5 6 12


Actual output:
0 1 3 3 5 6 0


Fixed submission (verdict: Accepted):
def CountingSort(A, B, k):
    C = [0] * (k+1)
    for i in range(k):
        C[i] = 0
    
    for j in range(0,n):
        C[A[j]]+=1
    
    
    for i in range(1,k+1):
        C[i] = C[i] + C[i-1]
    
    for j in range(n-1,-1,-1):
        B[C[A[j]]] = A[j]
        C[A[j]]-=1
        

n = int(input())
A = list(map(int,input().split()))
B = [0] * (n+1)
CountingSort(A,B,100000)
print(' '.join(map(str,B[1:])))

Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))

def countingSort(A, B, k):
    C = [0] * k
    for j in range(1, n):
        C[A[j]]+=1

    for i in range(1, k):
        C[i] = C[i] + C[i - 1]

    for j in range(1, n)[::-1]:
        B[C[A[j]]] = A[j]
        C[A[j]]-=1
    return B
        
print(countingSort(A, [0] * n, 10000))


Failing test case input:
7
5 9 3 0 6 3 3

Expected output:
0 3 3 3 5 6 9


Actual output:
[0, 0, 3, 3, 3, 6, 9]


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

def countingSort(A, B, k):
    C = [0] * k
    for j in range(0, n):
        C[A[j]]+=1

    for i in range(1, k):
        C[i] = C[i] + C[i - 1]

    for j in range(0, n)[::-1]:
        B[C[A[j]] - 1] = A[j]
        C[A[j]]-=1
    return B
        
print(' '.join(map(str, countingSort(A, [0] * n, 10000))))

Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))

def countingSort(A, B, k):
    C = [0] * k
    for j in range(1, n):
        C[A[j]]+=1

    for i in range(1, k):
        C[i] = C[i] + C[i - 1]

    for j in range(1, n)[::-1]:
        B[C[A[j]]] = A[j]
        C[A[j]]-=1
    return B
        
print(' '.join(map(str, countingSort(A, [0] * n, 10000))))


Failing test case input:
7
3 5 4 1 6 3 2

Expected output:
1 2 3 3 4 5 6


Actual output:
0 1 2 3 4 5 6


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

def countingSort(A, B, k):
    C = [0] * k
    for j in range(0, n):
        C[A[j]]+=1

    for i in range(1, k):
        C[i] = C[i] + C[i - 1]

    for j in range(0, n)[::-1]:
        B[C[A[j]] - 1] = A[j]
        C[A[j]]-=1
    return B
        
print(' '.join(map(str, countingSort(A, [0] * n, 10000))))
Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
def CountingSort(A, B, k):
    for i in range(k+1):
        C[i] = 0

    
    for j in range(1, n+1):
        C[A[j]] += 1

    
    for i in range(1, k+1):
        C[i] = C[i] + C[i-1]

    for j in range(1, n+1)[::-1]:
        B[C[A[j]]] = A[j]
        C[A[j]] -= 1


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

Failing test case input:
7
6 5 1 1 3 3 3

Expected output:
1 1 3 3 3 5 6


Actual output:

Fixed submission (verdict: Accepted):
def CountingSort(A, B, k):
    C = [0 for i in range(k+1)]
    n = len(A)
    
    for j in range(n):
        C[A[j]] += 1

    
    for i in range(1, k+1):
        C[i] = C[i] + C[i-1]

    for j in range(n)[::-1]:
        B[C[A[j]]-1] = A[j]
        
        C[A[j]] -= 1


n = int(input())
A = list(map(int, input().split()))
B = [0 for i in range(n)]
CountingSort(A, B, max(A))
print(*B)

Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*10000
for i in range(n):
    for j in range(n):
        if i == l[j]:
            bucket[i] += 1
            flg = i

for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)



Failing test case input:
7
5 3 4 0 12 3 1

Expected output:
0 1 3 3 4 5 12


Actual output:
0 1 3 3 4 5


Fixed submission (verdict: Accepted):
flg = 0
n = int(input())
l = list(map(int,input().split()))
bucket = [0]*10000
for i in range(n):
    bucket[l[i]] += 1
    if flg < l[i]:
        flg = l[i]
for i in range(flg):
    for j in range(bucket[i]):
        print(i,end = ' ')
for i in range(bucket[flg]-1):
    print(flg,end=' ')
print(flg)

Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
def countingsort(a, b, k):
    c = [0 for i in range(k + 1)]
    for i in range(len(a)):
        c[a[i]] += 1
    for i in range(1, len(c)):
        c[i] += c[i - 1]
    for i in range(len(a) - 1, -1, -1):
        b[c[a[i]] - 1] = a[i]
        c[a[i]] -= 1

n = int(input())
a = list(map(int, input().split()))
b = [0] * (n + 1)
countingsort(a, b, max(a))
print(*b)

Failing test case input:
7
6 5 2 0 6 3 0

Expected output:
0 0 2 3 5 6 6


Actual output:
0 0 2 3 5 6 6 0


Fixed submission (verdict: Accepted):
def countingsort(a, b, k):
    c = [0 for i in range(k + 1)]
    for i in range(len(a)):
        c[a[i]] += 1
    for i in range(1, len(c)):
        c[i] += c[i - 1]
    for i in range(len(a) - 1, -1, -1):
        b[c[a[i]] - 1] = a[i]
        c[a[i]] -= 1

n = int(input())
a = list(map(int, input().split()))
b = [0] * n
countingsort(a, b, max(a))
print(*b)
Problem: p02275
Buggy submission (Python3, verdict: Wrong Answer):
def CountingSort(A, B, k):
    C = [0 for i in range(k+1)]
    n = len(A)
    
    for j in range(n):
        C[A[j]] += 1

    
    for i in range(1, k+1):
        C[i] = C[i] + C[i-1]

    for j in range(n)[::-1]:
        B[C[A[j]]] = A[j]
        print(C[A[j]])
        C[A[j]] -= 1


n = int(input())
A = list(map(int, input().split()))
B = [0 for i in range(n+1)]
CountingSort(A, B, max(A))
print(*B)

Failing test case input:
7
6 5 1 0 6 3 1

Expected output:
0 1 1 3 5 6 6


Actual output:
3
4
7
1
2
5
6
0 0 1 1 3 5 6 6


Fixed submission (verdict: Accepted):
def CountingSort(A, B, k):
    C = [0 for i in range(k+1)]
    n = len(A)
    
    for j in range(n):
        C[A[j]] += 1

    
    for i in range(1, k+1):
        C[i] = C[i] + C[i-1]

    for j in range(n)[::-1]:
        B[C[A[j]]-1] = A[j]
        
        C[A[j]] -= 1


n = int(input())
A = list(map(int, input().split()))
B = [0 for i in range(n)]
CountingSort(A, B, max(A))
print(*B)
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int,input().split())
S = input()

def check(string):
    if '-' in string:
        print('No')
        quit()

if A + B + 1 != len(S) or S[A] != '-':
    print("No")
    quit()

check(S[:A])
rev_S = S[::-1]
print(rev_S)
check(rev_S[:B])

print("Yes")


Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
0566-962
Yes


Fixed submission (verdict: Accepted):
A, B = map(int,input().split())
S = input()

def check(string):
    if '-' in string:
        print('No')
        quit()

if A + B + 1 != len(S) or S[A] != '-':
    print("No")
    quit()

check(S[:A])
rev_S = S[::-1]
check(rev_S[:B])

print("Yes")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input()
if s[a] == '-':
    print('Yes')
else:
    print('No')

Failing test case input:
1 4
---

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
s = input()
if s[a] == '-' and s.count('-')==1:
    print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

A, B = map(int, input().split())
S = input()

if '-' in S[:A]:
    print('No')
    sys.exit()

if S[A] != '-':
    print('No')
    sys.exit()

if '-' in S[4:]:
    print('No')
    sys.exit()

print('Yes')


Failing test case input:
0 1
-,-

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import sys

A, B = map(int, input().split())
S = input()

if '-' in S[:A]:
    print('No')
    sys.exit()

if S[A] != '-':
    print('No')
    sys.exit()

if '-' in S[A + 1:]:
    print('No')
    sys.exit()

print('Yes')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = (int(i) for i in input().split())
S = str(input())

if S[A] != "-" or S[:A]in "-" or S[-B:] in "-":
    print('No')

else:
    print('Yes')


Failing test case input:
2 -1
-+-

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A,B = (int(i) for i in input().split())
S = str(input())
if S[A] != "-" or "-" in S[:A] or "-" in S[-B:]:
    print('No')

else:
    print('Yes')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
(A,B),S = map(int,input().split()),input()


if (len(S) == (A+B+1)) and (S[A] == '-') and (S.count('-') == 1) and len(re.findall('[0-9]', S)) == (A+B):
    print("Yes")
else:
    print("No")

print(len(re.findall('[0-9]', S)))


Failing test case input:
0 0
.-)

Expected output:
No


Actual output:
No
0


Fixed submission (verdict: Accepted):
import re
(A,B),S = map(int,input().split()),input()


if (len(S) == (A+B+1)) and (S[A] == '-') and (S.count('-') == 1) and len(re.findall('[0-9]', S)) == (A+B):
    print("Yes")
else:
    print("No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
s = input()
if s[a] == "-" and len(s) == a+b+1:
  if str.isdecimal(s[:a]) == True and str.isdecimal(s[a+1:]) == True:
    print("Yes")
else:
  print("No")

Failing test case input:
1 1
---

Expected output:
No

Actual output:

Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
s = input()
if s[a] == "-" and len(s) == a+b+1 and str.isdecimal(s[:a]) == True and str.isdecimal(s[a+1:]) == True:
    print("Yes")
else:
  print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())
S = input()

count = 0
S_list = []
for s in S:
    S_list.append(s)
    if s == '-':
        pass
    else:
        count += 1

hy_count = S_list.count('-')

if count == len(S) - 1 and hy_count == 1:
    print('Yes')
else:
    print('No')
    	

Failing test case input:
0 1
.-)

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
S = input()

count = 0
for s in S:
    if s == '-':
        break
    else:
        count += 1

S_list = []
for s in S:
    S_list.append(s)

hy_count = S_list.count('-')

if count == A and hy_count == 1:
    print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B= map(int, input().split(" "))
S=input()
if S[A]=="-" and len(S)==A+B+1:
    print("Yes")
else:
    print("No")

Failing test case input:
1 1
---

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):

A,B= map(int, input().split(" "))
S=input()
n=S.count("-")
if S[A]=="-" and len(S)==A+B+1 and n==1:
    print("Yes")
else:
    print("No")

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

a , b = map(int,input().split())
c = input()
d = len(c)
e = 0
for i in c:
    if i !="-" and i !=i:
        e += 1
if a+b+1 == d and c[a] =="-" and e==d:
    print("Yes")
else:
    print("No")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):

a , b = map(int,input().split())
c = input()
d = len(c)
e = 0
for i in range(d):
    if c[i] =="-" and i != a:
        e = e + 1
if a+b+1 == d and c[a] =="-" and e == 0:
    
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(map(int,input().split()))
S=input()
print(a[0])
if S.count("-") ==1 and S[a[0]]=="-":
	print("Yes")
else:
	print("No")


Failing test case input:
1 2
55

Expected output:
No


Actual output:
1
No


Fixed submission (verdict: Accepted):
a=list(map(int,input().split()))
S=input()
if S.count("-") ==1 and S[a[0]]=="-":
	print("Yes")
else:
	print("No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
a, b = map(int, input().split())
s = input()
if s[a] == '-':
  s = re.sub(r'-', '', s)
  print(s)
  if re.fullmatch(r'[0-9]+', s) and len(s) == a + b:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Failing test case input:
0 -1
-+-

Expected output:
No


Actual output:
+
No


Fixed submission (verdict: Accepted):
import re
a, b = map(int, input().split())
s = input()
if s[a] == '-' and len(s) == a + b + 1:
  s = re.sub(r'-', '', s)
  if re.fullmatch(r'[0-9]+', s) and len(s) == a + b:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import re
a,b = list(map(int,input().split()))
s = input()
if re.match(r"[1-9][1-9]*",s[:a]):
  if s[a]=="-":
    if re.match(r"[1-9][1-9]*",s[(a+1):b]):
      print("Yes")
      exit()
print("No")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import re
a,b = list(map(int,input().split()))
s = input()
if re.search(r"[0-9][0-9]*",s[0:a]):
  if s[a]=="-":
    if re.search(r"[0-9][0-9]*",s[(a+1):]):
      print("Yes")
      exit()
print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=[int(i) for i in input().split()]
s=input()
ans=0
if s[a]!="-":
    ans+=1
else:
    front=s[:a]
    back=s[a+1:]
    if ("-" not in front) and ("-" not in front):
        pass
    else:
        ans+=1
if ans==0:
    print("Yes")
else:
    print("No")
        

Failing test case input:
0 -1
-+-

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b=[int(i) for i in input().split()]
s=list(input())
ans=0

if s[a]=="-":
    del s[a]
    try:
        s=int("".join(s))
    except ValueError:
        print("No")
        ans+=1
else:
    ans+=1
    print("No")
    
if ans==0:
    print("Yes")

Problem: p03474
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A, B = map(int, input().split())
S = input()

if S[A] == '-' and '-' not in S[:A] and '-' and S[A+1:]:
    print("Yes")
else:
    print("No")

Failing test case input:
0 1
-,-

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
S = input()



if S[A] == '-' and '-' not in S[:A] and '-' not in S[A+1:]:
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=map(int,input().split())
s=input()
t=True
if s[a]=="-":
    x,y=s[:a],s[a+1:]
    if len(x) != a or len(y) != b:
        t=False
else:
    t=False
print("Yes" if t else "No")

Failing test case input:
1 1
---

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
s=input()
t=True
if s[a]=="-":
    x,y=s[:a],s[a+1:]
    if len(x) != a or len(y) != b or "-" in x or "-" in y:
        t=False
else:
    t=False
print("Yes" if t else "No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input().replace('-', '')
if len(s) == a+b and s.isdecimal():
    print('Yes')
else:
    print('No')


Failing test case input:
6 1
269-6650

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
str = input()
s = str.replace('-', '')
if len(s) == a+b and s.isdecimal() and str.rfind('-') == a:
    print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
S=str(input())
T=sorted(S[:])
print(*T)
p=0
if (A+B+1)!=len(S):
  print("No")
else:
  if S[A]=="-":
    for i in range(1,len(S)):
      if 48<=ord(T[i])<=57:
        print(i,T[i],ord(T[i]))
        p=1
      else:
        p=0
        break
    
    print("Yes" if p!=0 else "No")
  else:
    print("No")

Failing test case input:
1 2
55

Expected output:
No


Actual output:
5 5
No


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
S=str(input())
T=sorted(S[:])

p=0
if (A+B+1)!=len(S):
  print("No")
else:
  if S[A]=="-":
    for i in range(1,len(S)):
      if 48<=ord(T[i])<=57:
        
        p=1
      else:
        p=0
        break
    
    print("Yes" if p!=0 else "No")
  else:
    print("No")

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
s = input()

lst = s.split("-")
print(lst)
if len(lst[0]) == a and len(lst[1]) == b and len(lst) == 2:
    print("Yes")
else:
    print("No")

Failing test case input:
2 -1
-+-

Expected output:
No


Actual output:
['', '+', '']
No


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

lst = s.split("-")

if len(lst[0]) == a and len(lst[1]) == b and len(lst) == 2:
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=[int(i) for i in input().split()]
s=input()
s2=s.split()
if s[a]=='-' and s2[0].isdigit() and s2[1].isdigit():
  print("Yes")
else:
  print("No")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b=[int(i) for i in input().split()]
s=input()
s2=s.split("-")
if s[a]=='-' and s2[0].isdigit() and s2[1].isdigit():
  print("Yes")
else:
  print("No")

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




a, b = map(int,input().split())
s = input()


is_a_dec = str.isdecimal(s[0:a])
is_b_dec = str.isdecimal(s[a+1:len(s)])

if is_a_dec and is_b_dec:
    ans = 'Yes'
else:
    ans = 'No'


print(ans)


Failing test case input:
2 3
7444

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):




a, b = map(int,input().split())
s = input()


is_a_dec = str.isdecimal(s[0:a])
is_b_dec = str.isdecimal(s[a+1:len(s)])
is_hy = (s[a] == '-')

if is_a_dec and is_b_dec and is_hy:
    ans = 'Yes'
else:
    ans = 'No'


print(ans)
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())
S = input()

sliceA = S[0:A]
sliceB = S[A+1:A+B+1]

if sliceA.isdigit() and sliceB.isdigit() and S.find("-") == A and len(sliceA) == A and len(sliceB) == B:
    print("yes")
else:
    print("no")

Failing test case input:
0 4
7444

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())
S = input()

sliceA = S[0:A]
sliceB = S[A+1:A+B+1]

if sliceA.isdigit() and sliceB.isdigit() and S.find("-") == A and len(sliceA) == A and len(sliceB) == B:
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
s=list(input())
if s.count('-')==1 and len(s)==a+b+1:
    print('Yes')
else:
    print('No')

Failing test case input:
2 0
-+,

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
s=list(input())
if s.count('-')==1 and len(s)==a+b+1 and s[a]=='-':
    print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input()
if s[a] == '-':
  if s[:a].isdecimal() and s[-b:].isdecimal:
    print('Yes')
else:
  print('No')

Failing test case input:
2 -1
-+-

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
s = input()
if s[:a].isdigit() and s[a] =='-' and s[-b:].isdigit():
  print('Yes')
else:
  print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
c = input()
if len(c) < 4:
    print("No")
elif c[3] == "-" and c.count("-") == 1:
    print("Yes")
else:
    print("No")

Failing test case input:
6 2
269-665/

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
c = input()
if c[a] == "-" and c.count("-") == 1:
    print("Yes")
else:
    print("No")

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


a, b = map(int, input().split())
s = input()


isOUT = False
try:
    k = s[3]

    if k != "-":
        isOUT = True
except:
    isOUT = True
     
try:
    int(s[:3])
except:
    isOUT = True
    
try:
    int(s[3:])
except:
    isOUT = True

if isOUT:
    print("No")
else:
    print("Yes")
    


Failing test case input:
6 2
269-6650

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):


a, b = map(int, input().split())
s = input()

isNo = False
if s[a] != "-":
    isNo = True
else:
    try:
        int(s[:a])
    except:
        isNo = True

    try:
        int(s[a+1:])
    except:
        isNo = True

if isNo:
    print("No")
else:
    print("Yes")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
A,B = [int(n) for n in input().split()]

S = str(input())
if(S[A] != "-"):
    print("No")
    sys.exit()
L = len(S)
table = [n for n in range(10)]
for s in S:
    if not( s in table):
        print("No")
        sys.exit()
print("Yes")


Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import sys
A,B = [int(n) for n in input().split()]

S = str(input())
if(S[A] != "-"):
    print("No")
    sys.exit()
S = S[:A] + S[A+1:]
table = [str(n) for n in range(10)]
for s in S:
    if not( s in table):
        print("No")
        sys.exit()
print("Yes")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
s = list(input())
a_lis = s[:(a-1)]
b_lis = s[b:]
if s[a] == "-":
  if "-" not in a_lis:
    if "-" not in b_lis:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Failing test case input:
1 4
---

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
s = list(input())
a_lis = s[:(a-1)]
b_lis = s[-b:]
if s[a] == "-":
  if "-" not in a_lis:
    if "-" not in b_lis:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().strip().split())
S = input().strip()

if S.count("-") == 0 or S.count("-") >= 2:
  print("No")
else:
  tmp = S.split("-")
  if len(tmp[0]) >= 1 and len(tmp[1]) >= 1:
  	print("Yes")
  else:
    print("No")


Failing test case input:
6 3
0566-962

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A, B = map(int, input().strip().split())
S = input().strip()

if S.count("-") == 0 or S.count("-") >= 2:
  print("No")
else:
  if not S[A] == "-":
    print("No")
  else:
    tmp = S.split("-")
    if len(tmp[0]) >= 1 and len(tmp[1]) >= 1:
      print("Yes")
    else:
      print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = [int(i) for i in input().split()]
S = list(input())
S[A] = '='

if '-' in S:
    print('No')
else:
    print('Yes')

Failing test case input:
0 0
31

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A, B = [int(i) for i in input().split()]
S = list(input())
if '-' in S:
    S[A] = '='
    if '-' in S:
        print('No')
    else:
        print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int, input().split())
S = str(input())
for i,s in enumerate(S):
    if not i == A and S[i] == '-':
        print("NO")
        exit()
print('YES' if S[A] == '-' and len(S) == A+B+1 else "NO")    

Failing test case input:
0 0
5

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
A,B = map(int, input().split())
S = str(input())
for i,s in enumerate(S):
    if not i == A and S[i] == '-':
        print("No")
        exit()
print('Yes' if S[A] == '-' and len(S) == A+B+1 else "No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
(A,B),S = map(int,input().split()),input()


if (len(S) == (A+B+1)) and (S[A] == '-') and (S.count('-') == 1) and len(re.findall('[0-9]', S)) == (A+B):
    print("yes")
else:
    print("No")


Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
yes


Fixed submission (verdict: Accepted):
import re
(A,B),S = map(int,input().split()),input()


if (len(S) == (A+B+1)) and (S[A] == '-') and (S.count('-') == 1) and len(re.findall('[0-9]', S)) == (A+B):
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())
S = str(input())
len_S = len(list(S))
print(S[A+1:])
if S[A] == "-" and len_S == A+B+1 and S[0:A] != "-" and S[A+1:] != "-":
        print("Yes")
else:
        print("No")

Failing test case input:
-1 1
10506

Expected output:
No


Actual output:
10506
No


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())
S = str(input())
len_S = len(list(S))
S[A].isdecimal()
if S[A] == "-" and S[0:A] != "-" and S[A+1:] != "-" and S[0:A].isdecimal()== True and S[A+1:].isdecimal() ==  True and len_S == A+B+1:
        print("Yes")
else:
        print("No")

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input().split('-')

if len(s) == 2:
    print('Yes')
else:
    print('No')

Failing test case input:
-1 -1
-.+

Expected output:
No


Actual output:
Yes


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

if len(s.split('-')) == 2 and s[a] == '-':
    print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input()
if s[:a]!='-' and  s[a]=='-' and s[a+1:a+b+1]!='-':
    print('Yes')
else :
    print('No')

Failing test case input:
2 -2
-+-

Expected output:
No


Actual output:
Yes


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

if s[a] == '-' and '-' not in s[:a] and '-' not in s[a+1:]:
  print('Yes')
else:
  print('No')
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys


def solve(a,b,c):
    if len(c) == a+b+1:
        if  c.count("-")!=1:
            return "No"
        elif c[a]==("-"):
            return "Yes"
        else:
            return "No2"
    else:
        return "No4"

def readQuestion():
    line1 = sys.stdin.readline().rstrip()
    [str_n, str_i] = line1.split(' ')
    line2 = sys.stdin.readline().rstrip()
    return (int(str_n), int(str_i), line2)

def main():
    n, i, s = readQuestion()
    answer = solve(n, i, s)
    print(answer)
    
if __name__ == '__main__':
    main()

Failing test case input:
0 -1
.+-

Expected output:
No


Actual output:
No4


Fixed submission (verdict: Accepted):
import sys


def solve(a,b,c):
    if len(c) == a+b+1:
        if  c.count("-")!=1:
            return "No"
        elif c[a]==("-"):
            return "Yes"
        else:
            return "No"
    else:
        return "No"

def readQuestion():
    line1 = sys.stdin.readline().rstrip()
    [str_n, str_i] = line1.split(' ')
    line2 = sys.stdin.readline().rstrip()
    return (int(str_n), int(str_i), line2)

def main():
    n, i, s = readQuestion()
    answer = solve(n, i, s)
    print(answer)
    
if __name__ == '__main__':
    main()

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input()
for i in range(len(s)):
    if s[i] == "-":
        if i == a and len(s)-i-1 == b:
            print("Yes")
            break
        else:
            print("No")
            break

Failing test case input:
0 0
48

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
s = input()
ans = 0
for i in range(len(s)):
    if s[i] == "-":
        if i == a and len(s)-i-1 == b:
            ans = 1
            for j in range(b):
                if s[-j] == "-":
                    ans = 0
                    break
            break
if ans == 0:
    print("No")
else:
    print("Yes")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = (int(i) for i in input().split())
S = input()

if(S.find("-")==A):
    print("Yes")
else:
    print("No")

Failing test case input:
-1 1
5343

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A,B = (int(i) for i in input().split())
S = input()

if(S.count("-")==1 and (A+B+1==len(S)) and S.find("-")==A):
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
s = input()

if s.count('-') == 1:
    x,y = s.split('-')
    if x.isdigit and y.isdigit:
        print ("Yes")
        exit ()

print ("No")


Failing test case input:
0 2
0566-962

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())
s = input()

if s.count('-') == 1:
    x,y = s.split('-')
    if x.isdigit and y.isdigit and len(x) == n and len(y) == m:
        print ("Yes")
        exit ()

print ("No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())
S = input()
print(S[:A],S[A],S[B+1:])
if S[:A].isdigit() and S[A] == "-" and S[B:].isdigit():
    print("Yes")
else:
    print("No")

Failing test case input:
1 0
-,-

Expected output:
No


Actual output:
- , ,-
No


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())
S = input()

if S[:A].isdigit() and S[A] == "-" and S[B+1:].isdigit():
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int,input().split())
n = input()
if n[a]=="-":
  if n[0:a-1].isdecimal() and n[a+1:b].isdecimal():
    print("Yes")
    exit()
print("No")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
n = input()
if 1<=a<=5 and 1<=b<=5:
  if n[a]=="-":
    if n[0:a].isdecimal() and n[a+1:a+b+1].isdecimal():
      print("Yes")
      exit()
print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

(A,B),S = map(int,input().split()),input()
print("A: ", A)
print("B: ", B)
print("S: ", S)
print("length: ", len(S))

if (len(S) == (A+B+1)) and (S[A] == '-') and (S.count('-') == 1):
    print("yes")
else:
    print("No")
    


Failing test case input:
1 1
-,-

Expected output:
No


Actual output:
A:  1
B:  1
S:  -,-
length:  3
No


Fixed submission (verdict: Accepted):
import re
(A,B),S = map(int,input().split()),input()


if (len(S) == (A+B+1)) and (S[A] == '-') and (S.count('-') == 1) and len(re.findall('[0-9]', S)) == (A+B):
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
def no():
    print("No")
    sys.exit()
a,b=map(int,input().split())
s=input()
num=[str(i) for i in range(1,10)]
if len(s)==a+b+1:
    for i in range(a):
        if s[i] not in num: no()
    if s[a]!="-": no()
    for i in range(a+1,a+b+1):
        if s[i] not in num: no()   

else: no()

print("Yes")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import sys
def no():
    print("No")
    sys.exit()

a,b=map(int,input().split())
s=input()
num=[str(i) for i in range(10)]

if len(s)==a+b+1:
    for i in range(a):
        if s[i] not in num: no()
    if s[a]!="-": no()
    for i in range(a+1,a+b+1):
        if s[i] not in num: no()   

else: no()

print("Yes")

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

import re

a, b = map(int, input().split(' '))
s = input()
if re.match('\d{3}-\d{4}', s):
    print('Yes')
else:
    print('No')



Failing test case input:
0 2
269-6650

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

import re

X = input().split(' ')

s = input()
if re.match('^(\d{' + X[0] + '}-\d{'+ X[1]+ '})$', s):
    print('Yes')
else:
    print('No')
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input()
if s[a] == "-" :
    try :
        if int(s[:a]) is int and int(s[a+1:]) is int :
            print("Yes")
    except :
        print("No")
else :
    print("No")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
s = input()
if s[a] == "-" :
    try :
        if (isinstance(int(s[:a]),int)) and (isinstance(int(s[a+1:]),int)) :
            print("Yes")
        else :
            print("No")
    except :
        print("No")
else :
    print("No")

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x,y=map(int, input().split())
S=input()
if len(S)==x+y and S[x]=='-':
  print('Yes')
else:
  print('No')

Failing test case input:
1 2
---

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
x,y=map(int, input().split())
S=input()
if len(S)==x+y+1 and S[x]=='-' and S.count('-')==1:
  print('Yes')
else:
  print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input()
if s[a] == "-" :
    try :
        if int(s[:a]) is int and int(s[a+1:]) is int :
            print("Yes")
    except :
            print("No")
else :
    print("No")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:

Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
s = input()
if s[a] == "-" :
    try :
        if (isinstance(int(s[:a]),int)) and (isinstance(int(s[a+1:]),int)) :
            print("Yes")
        else :
            print("No")
    except :
        print("No")
else :
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
s=input()
if s.count('-') and s[a]=='-' and len(s)==a+b+1:
    print('Yes')
else:
    print('No')

Failing test case input:
1 1
---

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
s=input()
if s.count('-')==1 and s[a]=='-':
    print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
s=str(input())
slist=list(s)
temp=slist.count("-")
if temp==1 and slist[a]=="-":
  s.replace("","-")
  if s.isdecimal()==True:
    print("Yes")
  else:
    print("No")
else:
  print("No")


Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
s=str(input())
slist=list(s)
temp=slist.count("-")
if temp==1 and slist[a]=="-":
  s=s.replace("-","")
  if s.isdecimal()==True:
    print("Yes")
  else:
    print("No")
else:
  print("No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int,input().split())
S = list(input())
ans = True
if len(S) != (A+B+1):
    ans = False
elif S.count("-") != 1:
    ans = False
elif S.index("-") != A:
    ans = False
elif S != [i for i in S if i.isdecimal() or i == "-"]:
    ans = False
print(ans)


Failing test case input:
0 0
31

Expected output:
No


Actual output:
False


Fixed submission (verdict: Accepted):
A, B = map(int,input().split())
S = list(input())
ans = True
if len(S) != (A+B+1):
    ans = False
elif S.count("-") != 1:
    ans = False
elif S.index("-") != A:
    ans = False
elif S != [i for i in S if i.isdecimal() or i == "-"]:
    ans = False
if ans:
    print("Yes")
else:
    print("No")

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

characters = '0123456789-'

a, b = [int(s) for s in input().split()]
s = input()

is_postal = 'Yes'

if s[a] != '-':
    is_postal = 'No'

for c in s:
    if c not in characters:
        is_postal = 'No'
        break

print(is_postal)

Failing test case input:
1 4
---

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

characters = '0123456789-'

a, b = [int(s) for s in input().split()]
s = input()

is_postal = 'Yes'

if s[a] != '-' or s.count('-') != 1:
    is_postal = 'No'

for c in s:
    if c not in characters:
        is_postal = 'No'

print(is_postal)

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
s=input()
if s[a]=="-" and s[:a] not in "-" and s[:a+1] not in "-":
    print("Yes")
else:
    print("No")

Failing test case input:
2 -2
-+-

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
s=input()
if s[a]=="-" and (not "-"in s[:a]+s[a+1:]):
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=map(int,input().split())
s=input()
if (len(s)==a+b+1)&(s[a]=='-'):
    print('Yes')
else:
    print('No')

Failing test case input:
1 1
---

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
s=input()
if (len(s)==a+b+1)&(s[a]=='-')&(s.count('-')==1):
    print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())
S = input().split('-')
if A == len(S[0]):
    print("Yes")
else:
    print("No")


Failing test case input:
1 0
,--

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
S = input().split('-')
if A == len(S[0]) and len(S)==2:
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input()

if a+b+1==len(s) and s[a]=='-':
	print("Yes")
else:
  print("No")

Failing test case input:
1 1
---

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
s = input()
t = s[:a] + s[a+1:]

if s[a]=='-' and '-' not in t:
	print("Yes")
else:
  print("No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == '__main__':
    
    A, B = [int(x) for x in input().split(' ')]
    S = input()

    S = S.split('-')
    if len(S) < 2:
        print('No')
        exit()

    a = S[0]
    b = S[1]

    if len(a) == A:
        if len(b) == B:
            print('YES')
            exit()

    print('No')


Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
YES


Fixed submission (verdict: Accepted):
if __name__ == '__main__':
    
    A, B = [int(x) for x in input().split(' ')]
    S = input()

    S = S.split('-')
    if len(S) != 2:
        print('No')
        exit()

    a = S[0]
    b = S[1]

    if len(a) == A:
        if len(b) == B:
            print('Yes')
            exit()

    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B =map(int,input().split())
hih=0
num=1
S=str(input())
S= list(S)
for s in S:
    if num==A+1 and s=="-":
        hih=1
    num+=1
if hih==1:
    print("Yes")
else:
    print("No")

Failing test case input:
1 4
---

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

A,B =map(int,input().split())
hih=0
num=1
test=1
S=str(input())
S= list(S)
for s in S:
    if num==A+1 and s=="-":
        hih=1
    if num!=A+1 and s=="-":
        test=0
        
    
    num+=1
if hih==1 and test==1:
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = [int(i) for i in input().split()]

s = input()

flg = False
for idx,i in enumerate(s):
    if idx == a and i == '-':
        flg = True
        break
    
print('Yes' if flg else 'No')


Failing test case input:
2 -2
-+-

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b = [int(i) for i in input().split()]

s = input()

flg = False
if s[a]  == '-' and (s[:a] + s[a+1:]).isdigit():
    flg = True
print('Yes' if flg else 'No')

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b = map(int, input().split())
s = input().split('-')
print('Yes' if len(s) == 2 else 'No')

Failing test case input:
-1 0
.-*

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
s = input()
t = s.split('-')
print('Yes' if s[a] == '-' and len(t) == 2 else 'No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(map(int,input().split()))
S = input()

b = list(S.split("-"))

a.sort()
b.sort()

if a[0] == len(b[0]) and a[1] == len(b[1]):
    print("Yes")
else:
    print("No")


Failing test case input:
2 0
-+,

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
import re
A,B = list(map(int,input().split()))
S = input()

d = re.compile("\d+")

if (d.match(S[:A])) and S[A] == "-" and d.match(S[A+1:]):
    print("Yes")

else:print("No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a,b = map(int,input().split())
s = input()

mae = s[:a]
usiro = s[a+1:a+b+1]


if mae.isdecimal() and usiro.isdecimal():
    print('Yes')
else:
    print('No')

Failing test case input:
-1 1
27

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

a,b = map(int,input().split())
s = input()

mae = s[:a]
usiro = s[a+1:a+b+1]


if mae.isdecimal() and usiro.isdecimal() and s[a] == '-':
    print('Yes')
else:
    print('No')

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
S=input()

flg_haihun="-" not in (S[0:A]+S[A+1:A+B+1])

print("Yes" if A+B+1==len(S) and flg_haihun else "No")

Failing test case input:
-1 4
7444

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
S=input()

flg_haihun="-" not in (S[0:A]+S[A+1:A+B+1])

print("Yes" if A+B+1==len(S) and flg_haihun and S[A]=="-" else "No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys


def solve(n, i, s):
    c = 0
    for i in s:
        if i=='-':
            c+=1
    if  s[n]=='-' and c==1:
        return 'yes'
    else:
        return 'No'


def readQuestion():
    line1 = sys.stdin.readline().rstrip()
    [str_n, str_i] = line1.split(' ')
    line2 = sys.stdin.readline().rstrip()
    return (int(str_n), int(str_i), line2)

def main():
    n, i, s = readQuestion()
    answer = solve(n, i, s)
    print(answer)
    
if __name__ == '__main__':
    main()

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
yes


Fixed submission (verdict: Accepted):
import sys


def solve(n, i, s):
    c = 0
    for i in s:
        if i=='-':
            c+=1
    if  s[n]=='-' and c==1:
        return 'Yes'
    else:
        return 'No'


def readQuestion():
    line1 = sys.stdin.readline().rstrip()
    [str_n, str_i] = line1.split(' ')
    line2 = sys.stdin.readline().rstrip()
    return (int(str_n), int(str_i), line2)

def main():
    n, i, s = readQuestion()
    answer = solve(n, i, s)
    print(answer)
    
if __name__ == '__main__':
    main()

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B =map(int,input().split())
hih=0
num=1
S=str(input())
S= list(S)
for s in S:
    if num==A and s=="-":
        hih=num
    num+=1
if hih==A:
    print("Yes")
else:
    print("No")

Failing test case input:
0 0
57

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

A,B =map(int,input().split())
hih=0
num=1
test=1
S=str(input())
S= list(S)
for s in S:
    if num==A+1 and s=="-":
        hih=1
    if num!=A+1 and s=="-":
        test=0
        
    
    num+=1
if hih==1 and test==1:
    print("Yes")
else:
    print("No")
Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
s = input()

if s[:a].isdecimal()==True and s[-b:]==True and s[a]=='-':
    print("Yes")
else:
    print("No")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


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

if s[:a].isdecimal()==True and s[-b:].isdecimal()==True and s[a]=='-' and len(s[a+1:])==b:
    print("Yes")
else:
    print("No")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int, input().split())
s = input()

if s[a] != "-":
    print ("No")
if s.count("-") != 1:
    print ("No")
else:
    print ("Yes")

Failing test case input:
0 1
5343

Expected output:
No


Actual output:
No
No


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

if s[a] != "-":
    print ("No")
elif s.count("-") != 1:
    print ("No")
else:
    print ("Yes")

Problem: p03474
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re
z=input()[:-1].split(" ")
s=input()
print("Yes") if re.match("[0-9]{"+z[0]+"}-[0-9]{"+z[1]+"}",s) else print("No")

Failing test case input:
3 4
269-6650

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import re
z=re.split('\s',input())
s=input()
print("Yes") if re.match("\d{"+z[0]+"}-\d{"+z[1]+"}",s) else print("No")

Problem: p03474
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def resolve():
    a, b = map(int, input().split())
    s = input()
    
    flag_len = False
    flag_bar = False
    flag_num = True
    if a+b+1 == len(s):
        flag_len = True
    if s.count("-") == 1:
        flag_bar = True
    if flag_len and flag_bar:
        for c in s:
            code = ord(c)
            if code!= ord("-"):
                if code < ord("0") or ord("9") < code:
                    flag_num == False
                    break
    if flag_len and flag_bar and flag_num:
        print("Yes")
    else:
        print("No")
resolve()

Failing test case input:
6 1
269-6650

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
def resolve():
    a, b = map(int, input().split())
    s = input()
    
    flag_len = False
    flag_bar = False
    flag_num = True
    if a+b+1 == len(s):
        flag_len = True
    if s.count("-") == 1 and s[a] == "-":
        flag_bar = True
    if flag_len and flag_bar:
        for i in range(len(s)):
            code = ord(s[i])
            if code < ord("0") or ord("9") < code:
                if code!= ord("-"):
                    flag_num == False
                    break
                
    if flag_len and flag_bar and flag_num:
        print("Yes")
    else:
        print("No")
resolve()