s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s407107374 | p03474 | u263824932 | 1584215495 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 294 | A,B=map(int,input().split())
S=input()
number=0
list=[0,1,2,3,4,5,6,7,8,9]
for a in range(A):
if int(S[a]) in list:
number+=1
if S[A]=='-':
number+=1
for a in range(B):
if int(S[A+a+1]) in list:
number+=1
if number==A+B+1:
print('Yes')
else:
print('No')
|
s924859529 | p03474 | u897328029 | 1583980913 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 173 | a, b = list(map(int, input().split()))
s = input()
l = s.split("-")
if len(l) != 2:
ans = "No"
elif len[0]==a and len[1] == b:
ans = "Yes"
else:
ans = "No"
print(ans)
|
s554238926 | p03474 | u541610817 | 1583396631 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 235 | a, b = [int(x) for x in input().split()]
num = '0123456789'
S = input()
flg = True
for i in len(S):
if i == a:
if not S[i] == '-':
flg = False
else:
if not S[i] in num:
flg = False
print('Yes' if flg else 'No')
|
s373127319 | p03474 | u541610817 | 1583396578 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 234 | a, b = [int(x) for x in input().split()]
num = '0123456789'
S = input()
flg = True
for i in len(S):
if i == A:
if not S[i] == '-':
flg = False
else:
if not S[i] in num:
flg = False
print('Yes' if flg else 'No') |
s612593300 | p03474 | u881116515 | 1583191981 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 194 | a,b = map(int,input().split())
b = list(input())
ans = True
for i in range(a+b+1):
if not((i==a and b[i]=="-") or (i!=a and b[i]!="-")):
ans = False
break
print("Yes" if ans else "No") |
s295231711 | p03474 | u045953894 | 1583141131 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 302 | a,b = map(int,input().split())
s = input()
if s[a] == '-':
for i in range(a):
if 0 <= int(s[i]) <= 9:
for j in range(a+1,a+b+2):
if 0 <= int(s[i]) <= 9:
print('Yes')
break
break
else:
print('No')
|
s167291087 | p03474 | u695079172 | 1583107383 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 203 | a,b=map(int,input().split())
s=input()
first,second = s.split("-")
answer = len(first) ==a and len(second) == b
answer = answer and "-" not in first and "-" not in second
print("Yes" if answer else "No") |
s237146909 | p03474 | u337820403 | 1582228213 | Python | Python (3.4.3) | py | Runtime Error | 20 | 2940 | 94 | print("Yes" if len(s) == a+b+1 and s[a] == "-" and s[a+1] != "-" and s[a-1] != "-" else "No")
|
s337099176 | p03474 | u521323621 | 1581092832 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3060 | 181 | a, b = map(int, input().split())
s = input()
if s[a] != "-":
print("No")
else:
s1, s2 = s.split("-")
if s1.isdigit() and s2.isdigit():
print("Yes")
else:
print("No") |
s184012831 | p03474 | u127499732 | 1580867044 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 110 | a,b=map(int,input().split())
s=str(input())
f= s[a]=="-" and len(s)==a+b+1
print("Yes" if f is True else "No') |
s805101734 | p03474 | u368796742 | 1580754595 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 281 | a,b = map(int,input().split())
l = list(input())
count = 0
for i in range(a):
if 0<= int(l[i]) <= 9:
count += 1
if l[a] != "-":
print("No")
exit()
for i in range(a+1,a+b+1):
if 0<= int(l[i]) <= 9:
count += 1
if count == a+b:
print("Yes")
else:
print("No")
|
s314409307 | p03474 | u934868410 | 1579713475 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38256 | 282 | import math
n = int(input())
c = []
s = []
f = []
for i in range(n-1):
x,y,z = map(int, input().split())
c += [x]
s += [y]
f += [z]
for i in range(n-1):
ans = s[i]+c[i]
for j in range(i+1, n-1):
ans = (ans//f[j]) * math.ceil(ans/f[j]) + c[j]
print(ans)
print(0) |
s112332119 | p03474 | u735008991 | 1578453595 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 107 | A, B = input().split()
S1, S2 = input().split("-")
print("Yes" if len(S1) == A and len(S2) == B else "No")
|
s540672596 | p03474 | u329706129 | 1578434905 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 234 | import sys
a, b = map(int, input().split())
s = input()
flag = 0
for i in range(len(a + b - 1)):
if (s[a]) == '-': flag = True
if (s[not a] == '-'):
print('No')
sys.exit()
print('Yes') if flag else print('No')
|
s109131039 | p03474 | u914330401 | 1578432948 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 300 | def main():
a, b = map(int, input().split())
s = input()
for i in range(1, len(s)+1):
if i == a+1:
if s[i] != '-':
return False
else:
if s[i] == '-':
return False
return True
if __name__ == '__main__':
if main():
print('Yes')
else:
print('No') |
s962621691 | p03474 | u971237642 | 1578094455 | Python | Python (3.4.3) | py | Runtime Error | 20 | 2940 | 274 | # -coding: utf-8 -
a, b = map(int, input().split())
s = input()
if s[a] != "-":
isNo = True
else:
try:
int(s[:a])
except:
isNo = True
try:
int(s[a:])
except:
isNo = True
if isNo:
print("No")
else:
print("Yes")
|
s894069622 | p03474 | u076764813 | 1577881722 | Python | PyPy3 (2.4.0) | py | Runtime Error | 175 | 39664 | 163 | a,b=map(int,input().split())
s=input()
if len(s[:s.index("-")])!=a:
ans="No"
elif len(s[s.index("-")+1:])!=b:
ans="No"
else:
ans="Yes"
print(ans) |
s995530161 | p03474 | u672316981 | 1577860416 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 286 | a, b = map(int, input().split())
s = str(input())
cnt = 0
for i in range(a):
if int(s[i]) in range(0, 10):
cnt += 1
if s[a]=='-':
cnt += 1
for i in range(b):
if int(s[a+1+i]) in range(0, 10):
cnt += 1
if cnt == a+b+1:
print('Yes')
else:
print('No') |
s023262765 | p03474 | u492447501 | 1577731810 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 308 | import sys
A,B = map(int, input().split())
S = input()
str_len = len(S)
for i in range(str_len):
a = S[i]
if i==A:
if a=="-"
break
else:
print("No")
sys.exit()
if str.isdecimal(a)==False:
print("No")
sys.exit()
print("Yes")
|
s882114547 | p03474 | u609814378 | 1576535413 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | A,B = map(str, input().split())
S = input()
if S.count("-") == 1 and S[A] == "-":
ans = "Yes"
else:
ans = "No"
print(ans)
|
s844360212 | p03474 | u609814378 | 1576535210 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 164 | A,B = map(str, input().split())
S = input()
ans = 0
if S.count("-") == 1 and S[A] == "-":
ans = ans + 1
if ans == 0:
print("No")
else:
print("Yes")
|
s937432691 | p03474 | u774160580 | 1576352945 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 187 | A, B = map(int, input().split())
S = input()
pos_hyphen = [i if S[i] == "-" for i in range(len(S))]
if len(pos_hyphen) == 1 and pos_hyphen[0] == A:
print("Yes")
else:
print("No")
|
s035024888 | p03474 | u774160580 | 1576352696 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | A, B = map(int, input().split())
S = input()
if S.index("-") == A:
print("Yes")
else:
print("No")
|
s537864563 | p03474 | u540761833 | 1576342057 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 180 | A,B = map(int,input().split())
S = input().split('-')
if ('-' not in S[:A]) and (S[A] == '-') and ('-' not in S[A+1:]) and (len(S) == A+B+1):
print('Yes')
else:
print('No') |
s327216150 | p03474 | u045953894 | 1576260582 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 268 | a,b = map(int,input().split())
s = input()
for i in range(a):
if s[i] != '-':
if s[a] == '-':
for j in range(a+1,a+b+2):
if s[j] != '-':
print('Yes')
else:
print('No')
else:
print('No')
else:
print('No') |
s961086262 | p03474 | u183896397 | 1575156674 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 170 | A,B = (int(i) for i in input().split())
S = str(input())
if S[A] !== '-' or S[:A]in '-' or S[A+1:] in '-'or len(S) != A + B + 1:
print('No')
else:
print('Yes')
|
s338866476 | p03474 | u374802266 | 1574938611 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 253 | a,b=map(int,input().split())
s=input()
for i in range(a):
if s[i]=='-':
print('No')
sys.exit()
if s[a]!='-':
print('No')
sys.exit()
for i in range(b):
if s[i+a+1]=='-':
print('No')
sys.exit()
print('Yes') |
s235764097 | p03474 | u574226814 | 1574541422 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 155 | a, b = [int(x) for x in input().split()]
s = input()
if s[a] == "-" and len(s) == (a+b+1) and (s[:a]+s[a+1:].isdigit()):
print("Yes")
else:
print("No") |
s441546105 | p03474 | u452015170 | 1574219163 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 187 | a, b = map(int, input().split())
s = input()
if s[a] == "-" :
if int(s[:a]) is int and int(s[a+1:]) is int :
print("Yes")
else :
print("No")
else :
print("No") |
s051033521 | p03474 | u638795007 | 1574122388 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38256 | 649 | def examB():
A, B = LI(); St = S()
nums = list(map(str, range(10)))
ans = "Yes"
if St[A] == "-":
for s in S[:A] + S[A + 1:]:
if s not in nums:
ans = "No"
break
else:
ans = "No"
print(ans)
import sys,copy,bisect,itertools,heapq,math
fr... |
s642028040 | p03474 | u117193815 | 1573408022 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 238 | a,b=map(int, input().split())
s=list(input())
if s[a]!="-":
print("No")
exit()
for i in range(a):
if s[i]=="-":
print("No")
exit()
for i in range(b):
if s[((a+b)-a-1)+i]=="-":
print("No")
exit()
print("Yes")
|
s037684026 | p03474 | u117193815 | 1573405728 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 227 | a,b=map(int, input().split())
s=list(input())
if s[a]!="-":
print("No")
exit()
for i in range(a):
if s[i]=="-":
print("No")
exit()
for i in range(b):
if s[b+i]=="-":
print("No")
exit()
print("Yes") |
s245533690 | p03474 | u308684517 | 1572349177 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 8 | 1 2
7444 |
s441455196 | p03474 | u589432040 | 1572129224 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | A, B = map(int, input())
S = input()
if S[0:A].isdigit()==True and S[A]== "-" and S[A+1:A+B+1]:
print("Yes")
else:
print("No") |
s205720423 | p03474 | u672898046 | 1571853800 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 109 | a, b = map(int, input())
s = input()
if s[a] == "-" and s.count("-") == 1:
print("Yes")
else:
print("No") |
s787013033 | p03474 | u155687575 | 1571716709 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 353 | # B
a, b = map(int, input().split())
s = input()
n = len(s)
nums = list(range(10))
point = 0
flag = 'Yes'
if n != a+b+1:
flag = 'No'
print(flag)
exit()
while point<=n-1:
if point == a:
if s[point] != '-':
flag = 'No'
else:
if int(s[point]) not in nums:
flag ... |
s711777407 | p03474 | u155687575 | 1571715916 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 299 | # B
a, b = map(int, input().split())
s = input()
n = len(s)
nums = list(range(10))
point = 0
flag = 'Yes'
while (0<=point<=n-1):
if point == a:
if s[point] != '-':
flag = 'No'
else:
if int(s[point]) not in nums:
flag = 'No'
point += 1
print(flag) |
s384123457 | p03474 | u466331465 | 1570762858 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 208 | A,B = [int(x) for x in input().split()]
S = input()
for i in range(A+B+1):
if i==A and S[i]!="-":
print("No")
exit()
if i!=A and S[i]=="-" or int(S[i])>=10:
print("No")
exit()
print("Yes") |
s150312089 | p03474 | u466331465 | 1570762747 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 173 | A,B = [int(x) for x in input().split()]
S = input()
for i in range(A+B+1):
if i==A and S[i]!="-":
print("No")
if i!=A and int(S[i])>=10:
print("No")
print("Yes") |
s814213232 | p03474 | u353895424 | 1570419831 | Python | PyPy3 (2.4.0) | py | Runtime Error | 171 | 38468 | 242 | import re
a, b = map(int, input().split())
s = input()
p1 = "\d{"+ str(a) +"}"
p2 = "\d{"+ str(b) +"}"
if s[a] == "-" and re.fullmatch(p1, s[0:a]) != None and re.fullmatch(p2, s[a+1:]) != None:
print("Yes")
else:
print("No")
|
s763040809 | p03474 | u377989038 | 1569295779 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 268 | a, b = map(int, input().split())
s = input()
l = list(range(10))
for i in range(len(s)):
if i == 3:
if s[i] != "-":
print("No")
exit()
else:
if int(s[i]) not in l:
print("No")
exit()
print("Yes")
|
s751934593 | p03474 | u474925961 | 1569266056 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 191 | import sys
if sys.platform =='ios':
sys.stdin=open('input_file.txt')
a,b=map(int,input().split())
A,B=input().split("-")
if len(A)==a and len(B)==b:
print("Yes")
else:
print("No") |
s216202847 | p03474 | u131406572 | 1568689137 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 329 | a,b=map(int,input().split())
s=input()
y=0
c=[0,1,2,3,4,5,6,7,8,9]
for i in range(a):
for j in range(len(c)):
if int(s[i])!=c[j]:
y+=1
if s[a]!="-":
y+=1
for i in range(a+1,a+b+1):
for j in range(len(c)):
if int(s[i])!=c[j]:
y+=1
if y!=0:
print("Yes")
else:
pr... |
s989496461 | p03474 | u908349502 | 1568575931 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 210 | a,b=map(int,input().split())print(3)
s=input()
f=1
for i in range(a):
if s[i]=='-':
f=0
if s[a]!='-':
f=0
for j in range(b):
if s[a+1+j]=='-':
f=0
if f:
print('Yes')
else:
print('No') |
s255548523 | p03474 | u528720841 | 1568162934 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 142 | A, B = map(int, input().split())
S = input()
if S[A] == '-' and isdigit(S[0:A]) and isdigit(S[A+1:A+B+1]):
print("Yes")
else:
print("No") |
s816273112 | p03474 | u528720841 | 1568162880 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 140 | A, B = map(int, input().split())
S = input()
if S[A] == '-' or isdigit(S[0:A]) or isdigit(S[A+1:A+B+1]):
print("No")
else:
print("Yes") |
s465392416 | p03474 | u109617108 | 1567977177 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 113 | A,B=map(int(input().split()))
S=str(input())
if length(S)==A+B+1 and S[A]==-:
print("Yes")
else:
print("No")
|
s418114970 | p03474 | u109617108 | 1567977109 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 105 | A,B=int(input().split())
S="input()"
if length(S)==A+B+1 and S[A]==-:
print("Yes")
else:
print("No")
|
s894208999 | p03474 | u109617108 | 1567976921 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 107 | A,B=int(input().split())
S=str(input())
if length(S)==A+B and S[A]=="-":
print("Yes")
else:
print("No") |
s077058463 | p03474 | u891635666 | 1567365047 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 248 | a, b = map(int, input().split())
s = input()
ok = True
for i in range(a):
if s[i] == '-':
ok = False
ok = ok and s[a] == '-'
for i in range(b):
if s[a + 2 + i] == '-':
ok = False
if ok:
print('Yes')
else:
print('No') |
s853687332 | p03474 | u408791346 | 1567025119 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 170 | a, b = map(int, input().split())
s = list(input())
if int(''.join(s[0:a])) >= 0 and s[a]=='-' and int(''.join(s[a+2:a+b+1])) >= 0:
print('Yes')
else:
print('No') |
s831461747 | p03474 | u408791346 | 1567025045 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 165 | a, b = map(int, input().split())
s = list(input())
if int(''.join(s[0:a])) >= 0 and s[a]=='-' and int(''.join(s[a+2:])) >= 0:
print('Yes')
else:
print('No') |
s007093713 | p03474 | u302292660 | 1566707687 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 253 | a,b = map(int,input().split())
s = input()
L = [i for i in range(1,10)]
ans = "Yes"
for i in range(a):
if not int(s[i]) in L:
ans = "No"
if s[a] != "-":
ans = "No"
for i in range(a+1,a+b+1):
if not int(s[i]) in L:
ans = "No"
print(ans) |
s980747830 | p03474 | u243572357 | 1566701683 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 96 | a, b = map(int, input())
c = input()
print('Yes' if c[a] == '-' and c.count('-') == 1 else 'No') |
s654548682 | p03474 | u412481017 | 1566619879 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 228 | n=int(input())
dic={}
for _ in range(n):
r=input()
if r in dic:
dic[r]+=1
else:
dic[r]=1
n=int(input())
for _ in range(n):
r=input()
if r in dic:
dic[r]-=1
else:
dic[r]=-1
print(max(dic.values(),0)) |
s874614690 | p03474 | u602677143 | 1566565651 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 145 | a,b = map(int,input().split())
s = input()
if s[a] == "-":
s.remove(s[a])
if "-" in s:
print("No")
else:
print("Yes") |
s540031832 | p03474 | u305018585 | 1566331314 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 270 | def main(a,b,s):
if len(s) != a+1+b :
return 'No'
for n,i in enumerate(s) :
if n == a :
if i != '-' :
return 'No'
else :
try :
int(i)
except :
return 'No'
return 'Yes'
print(main(a,b,s)) |
s186955236 | p03474 | u798316285 | 1566279813 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 99 | a,b=map(int,input().split())
s=input()
print("Yes" if s.count("-")==1 and s.index("-")==a else "No) |
s845060910 | p03474 | u578146839 | 1566133776 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 180 | s=input()
t=input()
s.sort()
s=''.join(s)#辞書順最小=辞書で一番最初
t.sort()
t.reverse()
t=''.join(t)#辞書順最大
if s<t:
print('Yes')
else:
print('No')
|
s926552111 | p03474 | u802963389 | 1566132487 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3320 | 158 | a, b = map(int, input().split())
s = input()
if s[a] == "-" and s.count("-") == 1:
if s.replase("-", "").isdecimal():
print("Yes")
else:
print("No") |
s679548410 | p03474 | u248670337 | 1565903931 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 85 | a,b=input().split()
s=input()
print("Yes" if s[a]=="_" and s.count("_")==1 else "No") |
s958637510 | p03474 | u665038048 | 1565900036 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 125 | a, b = map(int. input().split())
s = list(input())
if s[a] == '-' and len(s) == (a+b):
print('Yes')
else:
print('No') |
s203081795 | p03474 | u360515075 | 1565808327 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 114 | A, B = map(int, input().split())
a, b = input().split("-")
print ("Yes" if len(a) == A and len(b) == B else "No")
|
s554423101 | p03474 | u626337957 | 1564244333 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 134 | A, B = map(int, input().split())
S = input()
if is_int(S[:A]) and S[A] == '-' and is_int(S[A+1:]):
print('Yes')
else:
print('No')
|
s867833657 | p03474 | u626337957 | 1564244025 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | A, B = map(int, input().split())
S = input()
if is_int(S[:A+1]) and S[A+1] == '-' and is_int(S[A+2:]):
print('Yes')
else:
print('No')
|
s663477467 | p03474 | u626337957 | 1564243875 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 146 | A, B = map(int, input().split())
S = input()
if is_integer(S[:A+1]) and S[A+1] == '-' and is_integer(S[A+2:]):
print('Yes')
else:
print('No')
|
s579457641 | p03474 | u626337957 | 1564243732 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 147 | A, B = map(int, input().split())
S = input()
if S[:A+1].is_integer() and S[A+1] == '-' and S[A+2:].is_integer():
print('Yes')
else:
print('No') |
s836007991 | p03474 | u037221289 | 1564193457 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 116 | A,B = map(int,input().split())
S = input()
if S.count('-')==1 and s[A]=='-':
print('Yes')
else:
print('No')
|
s067438096 | p03474 | u371409687 | 1564169428 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 168 | a,b=map(int,input().split())
s=input()
ans="Yes"
if s.count("-")!=1:
ans="No"
else:front,back=s.split("-")
if len(front)!=a or len(back)!=b:
ans="No"
print(ans) |
s406475480 | p03474 | u379959788 | 1563889301 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 400 | # ABC084-B
A, B = map(int, input().split())
S = input()
ans = 'No'
flag = True
num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
if S[A] == '-':
aa = S[0:A]
bb = S[A+1:A+B+1]
for i in range(len(aa)):
if aa[i] not in num:
flag = False
for k in range(len(bb)):
if bb[i] ... |
s185879026 | p03474 | u528005130 | 1562976027 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 542 | #include <iostream>
using namespace std;
int main(void){
// Your code here!
long long a, b;
string s;
cin >> a >> b;
cin >> s;
for(int i = 0; i < a + b + 1; i++){
if(i == a){
if(s[i] != '-'){
cout << "No" << endl;
return 0;
... |
s192670503 | p03474 | u448655578 | 1562476788 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 128 | A,B = map(int, input().split())
a,b = int(input().split('-'))
if len(a) == A and len(b) == B:
print('Yes')
else:
print('No') |
s216704668 | p03474 | u924308178 | 1560902389 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 282 | A,B = list(map(int,input().split(" ")))
S = input()
for i in range(len(S)):
if i==A:
if S[i]!="-":
print("No")
exit()
else:
if not ord('0')<=ord(str(i))<=ord('9'):
print("No")
exit()
print("Yes")
|
s323599438 | p03474 | u456033454 | 1560620109 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 118 | a, b = map(int, input().split())
s = input()
if(len(s) != a+b+1 or s[a] != '-'):
print('No')
sys.exit()
print('Yes') |
s799726170 | p03474 | u353652911 | 1559325602 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 262 | a,b=map(int,input().split())
#print(ab)
x=input()
#print(x)
x1=x[:a]
x2=x[a]
x3=x[a+1:a+b+1]
if x2=="-" and all(int(x1[i])>=0 and int(x1[i])<=9 for i in range(a)) and all(int(x3[j])>=0 and int(x3[j])<=9 for j in range(b)):
print("Yes")
else:
print("No") |
s303764152 | p03474 | u583276018 | 1559144882 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 279 | a, b = [int(i) for i in input().split()]
s = input()
s_top = int(s[:a])
s_middle = s[a:a+1]
s_under = int(s[a+1:a+b+1])
if(s_top >= pow(10, a-1) and s_top < pow(10, a)) and s_middle == '-' and (s_under >= pow(10, b-1) and s_under < pow(10, b)):
print("YES")
else:
print("NO") |
s456461753 | p03474 | u239316561 | 1559093665 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 196 | a,b = (int(x) for x in input().split())
s = input()
num = 0
for i in s:
if int(s)>= 0 and int(s)<= 9:
num += 1
if a + b == num and s[a] == '-':
print('Yes')
else:
print('No') |
s110887286 | p03474 | u405256066 | 1558851338 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 281 | A,B=[int(x) for x in stdin.readline().rstrip().split()]
S=(stdin.readline().rstrip())
flag=True
if S[:A].isdecimal() != True:
flag = False
elif S[A:A+1] != "-":
flag = False
elif S[A+1:].isdecimal() != True:
flag = False
if flag:
print("Yes")
else:
print("No") |
s361645742 | p03474 | u405256066 | 1558850709 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 278 | A,B=[int(x) for x in stdin.readline().rstrip().split()]
S=(stdin.readline().rstrip())
flag=True
if S[0:A].isdecimal() != True:
flag = False
elif S[A:B] != "-":
flag = False
elif S[B:].isdecimal() != True:
flag = False
if flag:
print("Yes")
else:
print("No") |
s068337704 | p03474 | u854946179 | 1558132302 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 332 | A,B =map(int,input().split())
hih=0
num=1
JG=1
S=int(input())
S= list(str(S))
for s in S:
if s=="-":
hih=num
num+=1
for s in S:
if s=="0" or s=="1" or s=="2" or s=="3" or s=="4" or s=="5" or s=="6" or s=="7" or s == "8" or s=="9":
else:
JG=0
if hih==A & JG==1:
print("Yes")
else:
... |
s103627801 | p03474 | u854946179 | 1558131744 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 176 | A,B =map(int,input().split())
hih=0
num=1
S=int(input())
S= list(str(S))
for s in S:
if s=="-":
hih=num
num+=1
if hih==A:
print("Yes")
else:
print("No") |
s514276685 | p03474 | u533017901 | 1558131725 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 380 | a,b =map(int,input().split())
c =int(input())
ans=True
if range(c)!=a+b+1 :
print("No")
else :
for i in range(a+b+1):
if i==a and c[i]!="-":
ans=False
elif c[i]!=0 and c[i]!=1 and c[i]!=2 and c[i]!=3 and c[i]!=4 and c[i]!=5 and c[i]!=6 and c[i]!=7 and c[i]!=8 and c[i]!=9 :
... |
s590063445 | p03474 | u533017901 | 1558131694 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 379 | a,b =map(int,input().split())
c =int,input()
ans=True
if range(c)!=a+b+1 :
print("No")
else :
for i in range(a+b+1):
if i==a and c[i]!="-":
ans=False
elif c[i]!=0 and c[i]!=1 and c[i]!=2 and c[i]!=3 and c[i]!=4 and c[i]!=5 and c[i]!=6 and c[i]!=7 and c[i]!=8 and c[i]!=9 :
... |
s407307368 | p03474 | u533017901 | 1558131592 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 403 | a,b =map(int,input().split())
c =map(int,input().split())
ans=True
if range(c)!=a+b+1 :
print("No")
else :
for i in range(a+b+1):
if i==a and c[i]!="-":
ans=False
elif c[i]!=0 and c[i]!=1 and c[i]!=2 and c[i]!=3 and c[i]!=4 and c[i]!=5 and c[i]!=6 and c[i]!=7 and c[i]!=8 and c[i]!=9 ... |
s505587357 | p03474 | u854946179 | 1558131399 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 176 | A,B =map(int,input().split())
hih=0
num=2
S=int(input())
S= list(str(S))
for s in S:
if s=="-":
hih=num
num+=1
if hih==A:
print("Yes")
else:
print("No") |
s595325571 | p03474 | u854946179 | 1558131372 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 172 | A,B =map(int,input().split())
hih=0
num=2
S=int(input())
S= list(str(S))
for s in S:
if s=="-":
hih=num
num+=1
if hih==A:
print(Yes)
else:
print(No) |
s723864179 | p03474 | u687044304 | 1557801380 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3056 | 390 | # -*- coding:utf-8 -*-
def solve():
A, B = list(map(int, input()))
S = input()
for i in range(len(S)):
if i == A:
if S[A] == "-":
continue
print("No")
return
try:
num = int(S[i])
except:
print("No")
... |
s836008787 | p03474 | u952022797 | 1556318915 | Python | Python (3.4.3) | py | Runtime Error | 25 | 3572 | 426 | # -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
def main():
A, B = map(int, input().split(" "))
S = input()
tmp = S.split("-")
if tmp[0].isdecimal() == False or tmp[1].isdecimal() == False:
print("No")
sys.exit()
if len(tmp[... |
s462006196 | p03474 | u923712635 | 1556077658 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 296 | A,B = [int(x) for x in input().split()]
S = input()
flag = True
for ind,i in enumerate(S):
if(ind!=A):
if(ord(i)<48 or 57<ord(i):
flag = False
break
else:
if(i!='-'):
flag = False
break
if(flag):
print('Yes')
else:
print('No') |
s660603767 | p03474 | u636162168 | 1555785576 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 120 | a,b=map(int,input().split())
s=input()
if s[a]=="-" and (not "-"in s[:a]+s[a+1:])
print("Yes")
else:
print("No") |
s103671514 | p03474 | u844005364 | 1555450601 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 115 | a, b = map(int, input().split())
s = input()
n = s[:a]+s[a+1:]
print("Yes" if s[a]="-" and n.isdigit() else "No") |
s455704050 | p03474 | u220345792 | 1555270391 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 118 | A, B = map(int, input().split())
S = input()
if S[A] = "-" and S.count("-") == 1:
print("Yes")
else:
print("No")
|
s944460041 | p03474 | u350049649 | 1555212663 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 244 | A,B=map(int,input().split())
S=input()
flag=False
for i in range(len(S)):
if i!=A and (S[i]-'0'<0 or 9<S[i]-'0'):
break
if i==A and S[i]!='-':
break
if i==len(S)-1:
flag=True
if flag:
print('Yes')
else:
print('No') |
s351553840 | p03474 | u732870425 | 1554174596 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 168 | a, b = map(int, input().split())
s = input()
if s[a] == "-":
s[a] = ""
if s.isdigit():
print("Yes")
else:
print("No")
else:
print("No") |
s856713657 | p03474 | u732870425 | 1554174063 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 279 | a, b = map(int, input().split())
s = input()
if s[a+1] == "-":
s2 = s[:a+1] + s[a+2:]
for i in range(a+b+1):
if s2[i] not in ["0","1","2","3","4","5","6","7","8","9"]:
print("No")
break
else:
print("Yes")
else:
print("No") |
s221895400 | p03474 | u859897687 | 1554098700 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 77 | a,b=map(int,input().split());s=input();print("YNeos"[len(s)<11*s[a]=="-"::2]) |
s912375454 | p03474 | u859897687 | 1554098621 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 71 | a,b=map(int,input().split());s=input();print(""[len(s)<11*s[a]=="-"::2] |
s424195302 | p03474 | u046187684 | 1553800191 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 194 | def solve(string):
a, b, s = string.split()
a = int(a)
return "Yes" if s[a] == "-" and (s[:a] + s[a + 1:]).isdigit() else "No"
if __name__ == '__main__':
print(solve(input()))
|
s236912011 | p03474 | u227082700 | 1553738921 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 96 | a,b=map(int,input().split());c,d=input().split("-");print("Yes"len(c)==a and len(d)==b else"No") |
s806117838 | p03474 | u568419568 | 1553205741 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 275 | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin >> a >> b;
string S;
cin >> S;
if(S[a]!='-'){
cout << "No" << endl;
return 0;
}
if(S.size()-(a+1)==b) cout << "Yes" << endl;
else cout << "No" << endl;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.