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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s137691153 | p03523 | u629350026 | 1595005425 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9040 | 215 | s=str(input())
s=list(s)
if s[0]!="A":
s.insert(0,"A")
if s[4]!="A":
s.insert(4,"A")
if s[6]!="A":
s.insert(6,"A")
if s[8]!="A":
s.insert(8,"A")
if "".join(s)=="AKIHABARA":
print("YES")
else:
print("NO") |
s435006276 | p03523 | u405660020 | 1594766034 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9084 | 212 | s=input()
AKB={"AKIHABARA","KIHABARA","AKIHBARA","KIHBARA","AKIHABRA","KIHABRA","AKIHBRA","KIHBRA","AKIHABAR","KIHABAR","AKIHBAR","KIHBAR","AKIHABR","KIHABR","AKIHBR","KIHBR"}
print("YES" if s in pos else "NO")
|
s621957462 | p03523 | u405660020 | 1594765909 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9104 | 282 | s=input()
flag=True
KIHBR="KIHBR"
s_new=s.replace("A", "")
if len(s_new)>5:
flag=False
else:
for i in range(5):
if s_new[i]!=KIHBR[i]:
flag=False
break
if s.count("AA")>1 or s.count("KIH")!=1:
flag=False
print("YES" if flag else "NO")
|
s457656695 | p03523 | u405660020 | 1594765720 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9112 | 268 | s=input()
flag=True
KIHBR="KIHBR"
s_new=s.replace("A", "")
cnt=0
for i in range(len(s_new)):
if s_new[i]!=KIHBR[cnt]:
flag=False
break
cnt+=1
if len(s_new)>5:
flag=False
if s.count("AA")>1:
flag=False
print("YES" if flag else "NO")
|
s352500342 | p03523 | u405660020 | 1594765581 | Python | Python (3.8.2) | py | Runtime Error | 30 | 8884 | 235 | s=input()
flag=True
KIHBR="KIHBR"
s_new=s.replace("A", "")
cnt=0
for i in range(len(s_new)):
if s_new[i]!=KIHBR[cnt]:
flag=False
break
cnt+=1
if s.count("AA")>1:
flag=False
print("YES" if flag else "NO")
|
s103939945 | p03523 | u503111914 | 1594439871 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8968 | 629 | S = input()
if len(S) >= 10:
print("NO")
else:
if S == "AKIHABARA":
print("YES")
elif S == "KIHABARA":
print("YES")
elif S == "AKIHBARA":
print("YES")
elif S == "AKIHABRA":
print("YES")
elif S == "AKIHABR":
print("YES")
elif S == "KIHBARA":
print("YES")
elif S == "KIHABRA":
p... |
s422206582 | p03523 | u503111914 | 1594439809 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8896 | 628 | S = input()
if len(S) >= 10:
print("NO")
else:
if S == "AKIHABARA":
print("YES")
elif S == "KIHABARA":
print("YES")
elif S == "AKIHBARA":
print("YES")
elif S == "AKIHABRA":
print("YES")
elif S == "AKIHABR":
print("YES")
elif S == "KIHBARA":
print("YES")
elif S == "KIHABRA":
p... |
s457140387 | p03523 | u972658925 | 1592109733 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 523 | ans = "AKIHABARA"
if len(s) >= 9 and s != "AKIHABARA":
print("NO")
else:
for i in range(2**(9-len(s)+2)):
lst = [""]*50
for j in range(9-len(s)+2):
if i&(1<<j):
lst[j] = "A"
#print(lst)
result = ""
for k1,k2 in zip(lst... |
s378245063 | p03523 | u560708725 | 1591995743 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 325 | s = list(input())
i = 0
if(len(s) <= 9):
if s[0] != "A":
s.insert(0,"A")
if s[4] != "A":
s.insert(4,"A")
if s[6] != "A":
s.insert(6, "A")
if ",".join(s) =="AKIHABARA":
print("YES")
elif len(s) != 9:
print("YES")
else:
print("NO")
else:
print("... |
s289993451 | p03523 | u357751375 | 1591844233 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 406 | s = list(input())
l = ['K','I','H','B','R']
j = 0
for i in range(len(s)):
if s[i] == 'A':
if i == 0:
pass
elif s[i-1] == 'A':
print('NO')
exit(0)
elif j == 1 or j == 2:
print('NO')
exit(0)
else:
pass
elif s[... |
s608810953 | p03523 | u357751375 | 1591843882 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 371 | s = list(input())
l = ['K','I','H','B','R']
j = 0
for i in range(len(s)):
if s[i] == 'A':
if s[i - 1] == 'A':
print('NO')
exit(0)
elif j == 1 or j == 2:
print('NO')
exit(0)
else:
pass
elif s[i] != l[j]:
print('NO')
... |
s877193619 | p03523 | u462329577 | 1591493202 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 430 | s = input()
cnt = 0
idx = 0
target = "KIHBR"
for i in range(len(s)):
if s[i] == "A":
cnt += 1
if idx == 1 and cnt == 1:
print("NO")
exit()
if cnt >= 2:
print("NO")
exit()
else:
if idx <= 5 and target[idx] == s[i]:
idx +=... |
s972987167 | p03523 | u462329577 | 1591492452 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 340 | s = input()
cnt = 0
idx = 0
target = "KIHBR"
for i in range(len(s)):
if s[i] == "A":
cnt += 1
if cnt >= 2:
print("NO")
exit()
else:
if target[idx] == s[i]:
idx += 1
cnt = 0
else:
print("NO")
exit()
if idx == ... |
s545952031 | p03523 | u462329577 | 1591492027 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 320 | s = input()
cnt = 0
idx = 0
target = "KIHBR"
for i in range(len(s)):
if s[i] == "A":
cnt += 1
if cnt >= 2:
print("NO")
exit()
else:
if target[idx] == s[i]:
idx += 1
else:
print("NO")
exit()
if idx == 5:
print("YES")
|
s087316009 | p03523 | u366886346 | 1591411112 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 264 | s=input()
str=["A","K","I","H","A","B","A","R","A"]
count=0
ans=0
for i in range(9):
if s[count]!=str[i] and str[i]!="A":
ans=1
break
else:
if s[count]==str[i]:
count+=1
if ans==1:
print("NO")
else:
print("YES")
|
s145068971 | p03523 | u279493135 | 1590294679 | Python | Python (3.4.3) | py | Runtime Error | 38 | 5200 | 1007 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string... |
s698041433 | p03523 | u038021590 | 1589556954 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 405 | S = input()
List = ['A', 'K', 'I', 'H', 'A', 'B', 'A', 'R', 'A']
num = 0
for i in range(len(S)):
if num > 8:
print('NO')
exit()
if S[i] == List[num]:
num += 1
elif List[num] == 'A':
num += 1
if S[i] == List[num]:
num += 1
else:
print(... |
s516645795 | p03523 | u038021590 | 1589556790 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 354 | S = input()
List = ['A', 'K', 'I', 'H', 'A', 'B', 'A', 'R', 'A']
num = 0
for i in range(len(S)):
if S[i] == List[num]:
num += 1
elif List[num] == 'A':
num += 1
if S[i] == List[num]:
num += 1
else:
print('NO')
exit()
else:
print('N... |
s795896339 | p03523 | u496821919 | 1589303224 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3192 | 554 | # -*- coding: utf-8 -*-
"""
Created on Tue May 12 12:45:03 2020
@author: shinba
"""
import sys
S = list(input())
if S.count("K") != 1 and S.count("I") != 1 and S.count("H") != 1 and S.count("B") != 1 and S.count("R") != 1:
print("NO")
sys.exit()
k = S.index("K")
i = S.index("I")
h = S.index("H")
b = S.i... |
s320196049 | p03523 | u896741788 | 1588823740 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 213 | s=input()
l=list("AKIHABARA".split("A"))[1:-1]
for ii in range(2**4):
p="A" if ii%2 else ""
i=ii
for j in range(3):
p+=l[j]
i//=2
p+="A" if i%2 else ""
if s==p:print("YES");exit()
print("NO") |
s820486267 | p03523 | u644126199 | 1588240359 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 493 | data =input()
data = list(data)
deter =""
if len(data) >9 :
print("NO")
if len(data) >=5 and len(data)<=9:
if data[0] !="A":
data.insert(0,"A")
if data[4] !="A":
data.insert(4,"A")
if data[6] !="A":
data.insert(6,"A")
if len(data) ==8:
data.append("A")
else:
if data[8] !="A":
dat... |
s424107940 | p03523 | u644126199 | 1588240244 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 469 | data =input()
data = list(data)
deter =""
if len(data) >9 :
print("NO")
if len(data) >=5 and len(data)<=9:
if data[0] !="A":
data.insert(0,"A")
if data[4] !="A":
data.insert(4,"A")
if data[6] !="A":
data.insert(6,"A")
if len(data) ==8:
data.append("A")
else:
if data[8] !="A":
dat... |
s046529910 | p03523 | u810356688 | 1587003133 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 336 | import sys
def input(): return sys.stdin.readline().rstrip()
def main():
h,w=map(int,input().split())
for i in range(h):
s=[_ for _ in input().split()]
for j in range(w):
if s[j]=="snuke":
print(chr(ord('A')+j)+str(i+1))
sys.exit()
if __name__=='__mai... |
s073712474 | p03523 | u991567869 | 1586286017 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 237 | s = input()
for i in range(0, 9, 2):
if i == 8 and len(s) <= 8:
s = s[:i] + "A" + s[i:]
elif i != 2:
if s[i] != "A":
s = s[:i] + "A" + s[i:]
if s == "AKIHABARA":
print("YES")
else:
print("NO") |
s332098319 | p03523 | u489155878 | 1586122097 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 420 | #入力
S=input()
#処理
l=len(S)
if l==0:
t=1
else:
t=0
X="AKIHABAR"
while len(S)!=0:
if S[0]=="A":
if S[0]==X[0]:
S=S[1:]
X=X[1:]
else:
t=1
break
else:
if X[0]=="A":
X=X[1:]
else:
if S[0]==X[0]:
S=S[1:]
X=X[1:]
else:
t=1
break
... |
s608144785 | p03523 | u489155878 | 1586122021 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 420 | #入力
S=input()
#処理
l=len(S)
if l==0:
t=1
else:
t=0
X="AKIHABARA"
while len(S)!=0:
if S[0]=="A":
if S[0]==X[0]:
S=S[1:]
X=X[1:]
else:
t=1
break
else:
if X[0]=="A":
X=X[1:]
else:
if S[0]==X[0]:
S=S[1:]
X=X[1:]
else:
t=1
break... |
s303762295 | p03523 | u489155878 | 1586121851 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 398 | #入力
S=input()
#処理
l=len(S)
if l==0:
t=1
else:
t=0
X="AKIHABARA"
while len(S)!=0:
if S[0]=="A":
if S[0]==X[0]:
S=S[1:]
X=X[1:]
else:
t=1
break
else:
if X[0]=="A":
X=X[1:]
else:
if S[0]==X[0]:
S=S[1:]
X=X[1:]
else:
t=1
break... |
s031600176 | p03523 | u489155878 | 1586121708 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 373 | #入力
S=input()
#処理
l=len(S)
t=0
X="AKIHABARA"
while len(S)!=0:
if S[0]=="A":
if S[0]==X[0]:
S=S[1:]
X=X[1:]
else:
t=1
break
else:
if X[0]=="A":
X=X[1:]
else:
if S[0]==X[0]:
S=S[1:]
X=X[1:]
else:
t=1
break
if t==0:
pri... |
s155156155 | p03523 | u423585790 | 1585846514 | Python | PyPy3 (2.4.0) | py | Runtime Error | 221 | 41712 | 1078 | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... |
s421860229 | p03523 | u127499732 | 1585269535 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 258 | def main():
s = str(input())
t = 'AKIHABARA'
i = 0
for u in t:
if s[i] == u:
i += 1
if i == len(t):
print('YES')
break
else:
print('NO')
if __name__ == '__main__':
main()
|
s348754285 | p03523 | u749770850 | 1584063340 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38384 | 264 | a = [str(i) for i in input()]
if len(a) > 6:
print("NO")
exit()
for bit in range(2 ** (len(a)+1)):
s = a.copy()
for i in range(0,len(a)+1):
if (bit >> i) & 1:
s.insert(i*2, "A")
if "".join(s) == "AKIHABARA":
print("YES")
exit()
print("NO")
|
s704489791 | p03523 | u749770850 | 1584063091 | Python | PyPy3 (2.4.0) | py | Runtime Error | 175 | 38408 | 227 | a = [str(i) for i in input()]
for bit in range(2 ** (len(a)+1)):
s = a.copy()
for i in range(0,len(a)+1):
if (bit >> i) & 1:
s.insert(i*2, "A")
if "".join(s) == "AKIHABARA":
print("YES")
exit()
print("NO")
|
s301603251 | p03523 | u995004106 | 1583367423 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38256 | 488 | import itertools
S=input()
N=len(S)
flag=0
s="AKIHABARA"
s2=""
l2=[]
count=0
for i in range(9):
l=list((itertools.combinations(s,i+1)))
#print(l)
for j in range(len(l)):
s2="".join(l[j])
l2.append(s2)
for i in range(len(l2)):
if l2[i]==S:
for j in range(len(l2[i])):
i... |
s576757339 | p03523 | u138253748 | 1583294850 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 97 | rt re
s=input()
m=re.match(r'A*KIHA*BA*RA*',s)
if m!=None:
print("YES")
else:
print("NO") |
s658309810 | p03523 | u920473284 | 1583205454 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 250 | s = input()
alpha = [0]*26
for i in range(len(s)):
alpha[ord(s[i]) - ord('a') ] += 1
if alpha['k' - 'a'] == 1:
alpha['i' - 'a'] == 1:
alpha['h' - 'a'] == 1:
alpha['b' - 'a'] == 1:
alpha['r' - 'a'] == 1:
print("YES")
else:
print("NO") |
s480941816 | p03523 | u217627525 | 1582778131 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 373 | s=input()
if s=="AKIHABARA":
print("YES")
else:
ans="YES"
if len(s)>9 or (len(s)==9 and s!="AKIHABARA") or "KIH" not in s:
ans="NO"
else:
s.remove("A")
if s!="KIHBR":
ans="NO"
else:
k,b,r=s.find("K"),s.find("B"),s.find("R")
if k>1 or b-... |
s493090747 | p03523 | u263933075 | 1582566447 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1246 | #include<bits/stdc++.h>
using namespace std;
string s;
int newone,rpb,rpr;
int main(){
cin>>s;
for(int i=0;i<s.size();i++){
if(s[i]=='A'){
if(newone==1||newone==3||newone==4||newone==5)newone=6;
else{
cout<<"NO"<<endl;
return 0;
}
... |
s122465041 | p03523 | u263933075 | 1582566148 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 90 | import re
p = 'A?KIHA?BA?RA?$'
s = raw_input()
print ['NO', 'YES'][re.match(p, s) != None] |
s255949792 | p03523 | u861141787 | 1582500945 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 292 | s = list(input())
t = ["A", "K", "I", "H", "A", "B", "A", "R", "A"]
if s[-1] != "A":
s = s + ["A"]
for i in range(len(t)):
if t[i] != s[i] and t[i] != "A":
break
if t[i] != s[i] and t[i] == "A":
s.insert(i, "A")
if s == t:
print("YES")
else:
print("NO") |
s570682513 | p03523 | u861141787 | 1582500647 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 349 | s = list(input())
t = ["A", "K", "I", "H", "A", "B", "A", "R", "A"]
if s == t:
print("YES")
exit()
if len(s) >= len(t):
print("NO")
exit()
if s[-1] != "A":
s = s + ["A"]
for i in range(len(t)):
if t[i] != s[i] and t[i] == "A":
s.insert(i, "A")
print(s)
if s == t:
print... |
s051778082 | p03523 | u861141787 | 1582500540 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 240 | s = list(input())
t = ["A", "K", "I", "H", "A", "B", "A", "R", "A"]
if s[-1] != "A":
s = s + ["A"]
for i in range(len(t)):
if t[i] != s[i] and t[i] == "A":
s.insert(i, "A")
if s == t:
print("YES")
else:
print("NO") |
s872862641 | p03523 | u080364835 | 1582075843 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 299 | s = list(input())
if len(s) <= 9:
if s[0] != 'A':
s.insert(0, 'A')
if s[4] != 'A':
s.insert(4, 'A')
if s[6] != 'A':
s.insert(6, 'A')
if len(s) == 8:
s.append('A')
if s == ['A','K','I','H','A','B','A','R','A']:
print('YES')
else:
print('NO')
|
s400763096 | p03523 | u080364835 | 1582075648 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 299 | s = list(input())
if len(s) <= 9:
if s[0] != 'A':
s.insert(0, 'A')
if s[4] != 'A':
s.insert(4, 'A')
if s[6] != 'A':
s.insert(6, 'A')
if len(s) == 8:
s.append('A')
if s == ['A','K','I','H','A','B','A','R','A']:
print('YES')
else:
print('NO')
|
s122397756 | p03523 | u977642052 | 1581462024 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 169 | def main(s: str):
if re.fullmatch(r"A?KIHA?BA?RA?", s):
print("YES")
else:
print("NO")
if __name__ == "__main__":
s = input()
main(s)
|
s260033091 | p03523 | u723721005 | 1580590848 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 90 | import re
p = 'A?KIHA?BA?RA?$'
s = raw_input()
print ['NO', 'YES'][re.match(p, s) != None] |
s980240899 | p03523 | u225388820 | 1579377388 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 174 | s=list(input())
a="AKIHABARA"
n=len(a)
m=len(s)
j=0
for i in range(n):
if s[j]==a[i]:
j+=1
elif a[i]!='A':
print('NO')
if m==j:
print('YES')
else:
print('NO') |
s262722564 | p03523 | u311636831 | 1579112837 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38640 | 379 | S=input()
T="AKIHABARA"
c=0
t=0
while(True):
if(len(S)==c):
if(T[t]=="A"):
t+=1
else:
print("NO")
exit()
elif(S[c]==T[t]):
c+=1
t+=1
else:
if(T[t]=="A"):
t+=1
else:
print("NO")
exit()
... |
s573767712 | p03523 | u475503988 | 1579061897 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 265 | s = input()
t = 'AKIHABARA'
i, j = 0, 0
ans = 'YES'
while j < len(t):
if i == len(s) and t[j] == 'A':
j += 1
elif s[i] == t[j]:
i += 1
j += 1
elif t[j] == 'A':
j += 1
else:
ans = 'NO'
break
print(ans)
|
s818973652 | p03523 | u716530146 | 1578985702 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 206 | A="AKIHABARA"
s=input()
n=len(s)
na=len(A)
i=0
j=0
while i<n j<na-1:
if s[i]==A[j]:
i+=1; j+=1
elif s[i]!=A[j] and A[j]=="A":
j+=1
else:
break
if j==n-1:
print("YES")
else:
print("NO") |
s788584911 | p03523 | u716530146 | 1578985638 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 208 | A="AKIHABARA"
s=input()
n=len(s)
na=len(A)
i=0
j=0
while i<=n j<=na-1:
if s[i]==A[j]:
i+=1; j+=1
elif s[i]!=A[j] and A[j]=="A":
j+=1
else:
break
if j==n-1:
print("YES")
else:
print("NO") |
s284489790 | p03523 | u673361376 | 1577419301 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38384 | 220 | S = input()
akb = 'AKIHABAR'
if len(S) <= len(akb)+1:
i = 0
for a in akb:
if S[i] == a: i+=1
elif S[i] != a and a == 'A': continue
else:
print('NO')
exit()
print('YES')
else:
print('NO')
|
s034539478 | p03523 | u673361376 | 1577417407 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38256 | 251 | S = input()
i = 0
for a in 'AKIHABARA':
if i >= len(S) and a == 'A':
S = S + 'A'
i += 1
elif S[i] != a:
if a == 'A':
S = S[:i] + 'A' + S[i:]
i += 1
else:
print('NO')
exit()
else:
i += 1
print('YES')
|
s379535051 | p03523 | u693694535 | 1577249512 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 575 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
print('NO')
sys.exit()
for i in range(len(S)):
if S[i] not in list('AKIHABARA'):
print('NO')
sys.exit()
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
sys.exit()
elif S[i]=='K... |
s417933744 | p03523 | u693694535 | 1577248208 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 575 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
print('NO')
sys.exit()
for i in range(len(S)):
if S[i] not in list('AKIHABARA'):
print('NO')
sys.exit()
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
sys.exit()
elif S[i]=='K... |
s949211726 | p03523 | u693694535 | 1577247992 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 620 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
print('NO')
sys.exit()
elif S.count('A')==4:
if list(S)==list('AKIHABARA'):
print('YES')
sys.exit()
else:
print('NO')
sys.exit()
for i in range(len(S)-1):
if S[i]==S[i+1]:
pri... |
s603585929 | p03523 | u693694535 | 1577247661 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 598 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
print('NO')
sys.exit()
else:
for i in range(len(S)):
if S[i] not in list('AKIHABARA'):
print('NO')
sys.exit()
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
sys.e... |
s501128967 | p03523 | u693694535 | 1577247088 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 474 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
print('NO')
sys.exit()
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
sys.exit()
elif S[i]=='K' and S[i+1]!='I':
print('NO')
sys.exit()
elif S[i]=='I' and S[i+1]!='H':
... |
s394890746 | p03523 | u693694535 | 1577246922 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 399 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
print('NO')
sys.exit()
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
sys.exit()
elif S[i]=='K' and S[i+1]!='I':
print('NO')
sys.exit()
for i in range(len(Q)):
if Q[i]==U[i]:
... |
s583508201 | p03523 | u693694535 | 1577246839 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 399 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
print('NO')
sys.exit()
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
sys.exit()
elif S[i]=='K' and S[i+1]!='I':
print('NO')
sys.exit()
for i in range(len(S)):
if Q[i]==U[i]:
... |
s649253216 | p03523 | u693694535 | 1577246712 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 450 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
print('NO')
else:
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
sys.exit()
elif S[i]=='K' and S[i+1]!='I':
print('NO')
sys.exit()
for i in range(len(S... |
s328594090 | p03523 | u693694535 | 1577246651 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 450 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>3:
print('NO')
else:
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
sys.exit()
elif S[i]=='K' and S[i+1]!='I':
print('NO')
sys.exit()
for i in range(len(S... |
s521000979 | p03523 | u693694535 | 1577246519 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 393 | S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
if S.count('A')>3:
print('NO')
else:
for i in range(len(S)-1):
if S[i]==S[i+1]:
print('NO')
elif S[i]=='K' and S[i+1]!='I':
print('NO')
for i in range(len(S)):
if Q[i]==U[i]:
pass
else:... |
s264202411 | p03523 | u296150111 | 1576364702 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3060 | 248 | s=input()
ans=[]
def two(k):
qq="0"*(9-len(bin(k)[2:]))+bin(k)[2:]
return qq
for i in range(1,2**9):
p=""
for j in range(9):
if two(i)[j]=="1":
p+="AKIHABARA"[j]
ans.append(p)
if s in ans:
print("YES")
else:
print("NO")
print(2/0)
|
s703772890 | p03523 | u815878613 | 1576041429 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 392 | S = list(input())
AK = list('AKIHABARA')
if len(S) >= len(AK):
print('NO')
else:
for i in range(len(S)):
if S[i] != AK[i]:
S.insert(i, AK[i])
for i in range(len(S)):
if S[i] != AK[i]:
S.insert(i, AK[i])
if len(S) != len(AK):
S.append('A')
if ''.joi... |
s282635660 | p03523 | u814986259 | 1575985362 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 231 | S=list(input())
A="AKIHABARA"
id=0
for i in range(len(A)):
if A[i]==S[i]:
continue
else:
if A[i]=="A":
S.insert("A",i)
else:
print("NO")
exit(0)
if "".join(S)==A:
print("YES")
else:
print("NO") |
s076038452 | p03523 | u814986259 | 1575984968 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 189 | S=input()
A="AKIHABARA"
id=0
for i in range(len(A)):
if A[i]==S[id]:
id+=1
continue
else:
if A[i]=="A":
continue
else:
print("NO")
exit(0)
print("YES") |
s848874494 | p03523 | u859897687 | 1575215425 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38256 | 349 | s=input()
ans=1
i=0
if s[i]=="A":
i+=1
if s[i]=="K":
i+=1
else:
ans=0
if s[i]=="I":
i+=1
else:
ans=0
if s[i]=="H":
i+=1
else:
ans=0
if s[i]=="A":
i+=1
if s[i]=="B":
i+=1
else:
ans=0
if s[i]=="A":
i+=1
if s[i]=="R":
i+=1
else:
ans=0
if s[i]=="A":
i+=1
if i!=len(s):
ans=0
if ans:
print("... |
s498727540 | p03523 | u597455618 | 1574403689 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 350 | s = input()
for i in range(len(s)):
if s[i] == "K" ans i == 0:
s = s[:i] + "A" + s[i:]
elif s[i] == "H" and s[i+1] != "A":
s = s[:i] + "A" + s[i:]
elif s[i] == "B" and s[i+1] != "A":
s = s[:i] + "A" + s[i:]
elif s[i] == "R" and s[i+1] != "A":
s = s[:i] + "A" + s[i:]
if s == "AKIHABARA":
pr... |
s163803299 | p03523 | u597455618 | 1574402926 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 234 | s = input()
AKB = "KIHBR"
tmp = 0
count = 0
for i in range(len(s)):
if s[i] == "A" and count < 4:
count += 1
elif s[i] == AKB[tmp]:
tmp += 1
else:
break
if count <= 4 and tmp == 5:
print("YES")
else:
print("NO") |
s664719074 | p03523 | u597455618 | 1574402853 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 216 | s = input()
AKB = "KIHBR"
tmp = 0
count = 0
for i in range(len(s)):
if s[i] == "A" and count < 4:
count += 1
elif s[i] == AKB[tmp]:
tmp += 1
if count <= 4 and tmp == 5:
print("YES")
else:
print("NO") |
s828137339 | p03523 | u597455618 | 1574402794 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 213 | s = input()
AKB = KIHBR
tmp = 0
count = 0
for i in range(len(s)):
if s[i] == "A" and count < 4:
count += 1
elif s[i] == AKB[tmp]:
tmp += 1
if count <= 4 and tmp = 5:
print("YES")
else:
print("NO") |
s845685482 | p03523 | u941438707 | 1574367862 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 191 | s=input()
j=0
for i in "AKIHABARA":
if i==s[j]:
j+=1
elif i=="A":
continue
elif j==len(s):
break
else:
print("NO")
exit()
print("YES") |
s336438374 | p03523 | u941438707 | 1574367607 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 133 | s=input()
j=0
for i in "AKIHABARA":
if i==s[j] or i=="A":
j+=1
else:
print("NO")
exit()
print("YES") |
s392290928 | p03523 | u941438707 | 1574367329 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 194 | s=input()
a="AKIHABARA"
j=0
for i in s:
if i==a[j]:
j+=1
elif j<8:
if i==a[j+1] and a[j]=="A":
j+=2
else:
print("NO")
exit()
print("YES") |
s571852696 | p03523 | u941438707 | 1574367267 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 183 | s=input()
a="AKIHABARA"
j=0
for i in s:
if i==a[j]:
j+=1
elif i==a[j+1] and a[j]=="A" and j<8:
j+=2
else:
print("NO")
exit()
print("YES") |
s296968953 | p03523 | u941438707 | 1574366474 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 222 | s=input()
a="AKIHABARA"
j=0
for i in s:
if j>8:
print("NO")
exit()
if i==a[j]:
j+=1
elif i==a[j+1] and a[j]=="A":
j+=2
else:
print("NO")
exit()
print("YES") |
s274360072 | p03523 | u256464928 | 1574018553 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 223 | S = list(input())
if S[0] != "A":
S.insert(0,"A")
if S[4] != "A":
S.insert(4,"A")
if S[6] != "A":
S.insert(6,"A")
if S[-1] != "A":
S.append("A")
s = ""
for i in S:
s += i
print("YES" if s == "AKIHABARA" else "NO") |
s726258093 | p03523 | u590647174 | 1573984146 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 508 | def judge(str):
l = list(str)
akiba = list("AKIHABARA")
if l.count("K")==1 and l.count("I")==1 and l.count("H")==1 and l.count("B")==1 and l.count("R")==1:
k = l.index("K")
if k==0:
l.slice[0:0] = ["A"]
b = l.index("B")
if b==4:
l.slice[4:4] = ["A"]
r = l.index("R")
if r==6:
... |
s443173861 | p03523 | u590647174 | 1573981597 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 277 | def judge(str):
l = list(str)
k = l.index("K")
i = l.index("I")
h = l.index("H")
b = l.index("B")
r = l.index("R")
if 0<=k<=1 and i==k+1 and h==i+1 and 0<=b-h<=1 and 0<=r-b<=1 and 0<=len(str)-r<=1:
print("YES")
else:
print("NO")
str = input()
judge(str) |
s204166467 | p03523 | u590647174 | 1573981509 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 277 | def judge(str):
l = list(str)
k = l.index("K")
i = l.index("I")
h = l.index("H")
b = l.index("B")
r = l.index("R")
if 0<=k<=1 and i==k+1 and h==i+1 and 0<=b-a<=1 and 0<=r-b<=1 and 0<=len(str)-r<=1:
print("YES")
else:
print("NO")
str = input()
judge(str) |
s685164925 | p03523 | u590647174 | 1573981469 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 277 | def judge(str):
l = list(str)
k = l.index("K")
i = l.index("I")
h = l.index("H")
b = l.index("B")
r = l.index("R")
if 0<=k<=1 and i==k+1 and h==i+1 and 0<=b-a<=1 and 0<=r-b<=1 and 0<=len(str)-r<=1:
print("Yes")
else:
print("No")
str = input()
judge(str) |
s589068052 | p03523 | u590647174 | 1573981376 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 274 | def judge(str):
l = list(str)
k = l.index("K")
i = l.index("I")
h = l.index("H")
b = l.index("B")
r = l.index("R")
if k<=1 and i==k+1 and h==i+1 and 0<=b-a<=1 and 0<=r-b<=1 and 0<=len(str)-r<=1:
print("Yes")
else:
print("No")
str = input()
judge(str) |
s926409569 | p03523 | u590647174 | 1573980682 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 226 | def judge(str):
l = list(str)
k = l.index("K")
i = l.index("I")
h = l.index("H")
b = l.index("B")
r = l.index("R")
if k<i and i<h and h<b and b<r:
print("Yes")
else:
print("No")
str = input()
judge(str) |
s198962528 | p03523 | u727787724 | 1573708860 | Python | PyPy3 (2.4.0) | py | Runtime Error | 185 | 38256 | 152 | s=list(input())
if s.count('K')==1 and s.count('I')==1 and s.count('H')==1 ands.count('B')==1 ands.count('R')==1:
print('YES')
else:
print('NO') |
s895679930 | p03523 | u346395915 | 1573434844 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 428 | s = list(input())
t = list("AKIHABARA")
if len(s) > len(t):
print("NO")
exit()
if len(s) < 5:
print("NO")
exit()
while True:
cnt = 0
for i in range(8):
if s[cnt] == t[i]:
cnt += 1
continue
elif t[i] == "A":
s.insert(i, "A")
... |
s501050537 | p03523 | u346395915 | 1573433897 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 481 | s = list(input())
t = list("AKIHABARAw")
cnt = 0
if len(s) > len(t)-1:
print("NO")
exit()
for i in range(len(s)):
if s[i] == t[cnt]:
cnt += 1
else:
if t[cnt] == "A":
cnt += 1
if t[cnt] == s[i]:
cnt += 1
else:
print("N... |
s267980669 | p03523 | u346395915 | 1573433527 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 523 | s = list(input())
t = list("AKIHABARAz")
cnt = 0
if len(s) > len(t)-1:
print("NO")
exit()
for i in range(len(s)):
if s[i] == t[cnt]:
cnt += 1
continue
else:
if t[cnt] == "A":
cnt += 1
if t[cnt] == s[i]:
cnt += 1
continue
... |
s683075676 | p03523 | u346395915 | 1573433428 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 520 | s = list(input())
t = list("AKIHABARA")
cnt = 0
if len(s) > len(t):
print("NO")
exit()
for i in range(len(s)):
if s[i] == t[cnt]:
cnt += 1
continue
else:
if t[cnt] == "A":
cnt += 1
if t[cnt] == s[i]:
cnt += 1
continue
... |
s823395774 | p03523 | u346395915 | 1573433103 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 472 | s = list(input())
t = list("AKIHABARA")
cnt = 0
for i in range(len(s)):
if s[i] == t[cnt]:
cnt += 1
continue
else:
if t[cnt] == "A":
cnt += 1
if t[cnt] == s[i]:
cnt += 1
continue
else:
print("NO")
... |
s010188020 | p03523 | u970308980 | 1572064471 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38256 | 326 | S = input().strip()
K = S.find('K')
I = S.find('I')
H = S.find('H')
B = S.find('B')
R = S.find('R')
if S.find('AA'):
print('NO')
exit()
if K in [0, 1] and I >= 0 and H >= 0 and B >= 0 and R >= 0 and \
I-K in [0, 1] and H-I in [0, 1] and B-H in [0, 1] and R-B in [0, 1] and:
print('YES')
else:
print... |
s747373579 | p03523 | u405256066 | 1571988180 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 321 | from sys import stdin
S = (stdin.readline().rstrip())
flag = False
for i in ["","A"]:
for j in ["","A"]:
for k in ["","A"]:
for l in ["","A"]:
s = i + KIH + j + B + k + R + l
if S == s:
flag = True
if flag:
print("YES")
else:
print("NO"... |
s472168028 | p03523 | u716529032 | 1571966357 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 278 | s = list(input())
if(len(s) > 9):
print("NO")
exit()
ans = "AKIHABARA"
i = 0
while(i < len(ans) and len(s) <= len(ans)):
if("".join(s) == ans):
print("YES")
exit()
if(i == len(ans) - 1 or s[i] != ans[i]):
s.insert(i, "A")
else:
i += 1
print("NO") |
s965219320 | p03523 | u716529032 | 1571955309 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 279 | s = list(input())
if(len(s) > 10):
print("NO")
exit()
ans = "AKIHABARA"
i = 0
while(i < len(ans) and len(s) <= len(ans)):
if("".join(s) == ans):
print("YES")
exit()
if(i == len(ans) - 1 or s[i] != ans[i]):
s.insert(i, "A")
else:
i += 1
print("NO") |
s943963078 | p03523 | u777283665 | 1571262525 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 85 | s = input()
if re.match('A?KIHA?BA?RA?$', s):
print("YES")
else:
print("NO") |
s810995785 | p03523 | u476418095 | 1569817485 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3188 | 81 | import re
d='A?KIHA?BA?RA?$'
s=raw_input()
print['NO','YES'][re.match(d,s)!=None] |
s839941999 | p03523 | u633255271 | 1569559237 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38256 | 535 | from collections import Counter
import itertools
N = int(input())
D = list(map(int, input().split()))
M = Counter(D)
if max(M.values()) > 2:
print(0)
elif 0 in D:
print(0)
else:
D = [[x, 24-x] for x in D]
generator = list(itertools.product([0, 1], repeat=N))
D_gen = [[D[i][g[i]] for i in range(N)]... |
s004233696 | p03523 | u633255271 | 1569559215 | Python | PyPy3 (2.4.0) | py | Runtime Error | 171 | 38256 | 1044 | from collections import Counter
import itertools
N = int(input())
D = list(map(int, input().split()))
M = Counter(D)
if max(M.values()) > 2:
print(0)from collections import Counter
import itertools
N = int(input())
D = list(map(int, input().split()))
M = Counter(D)
if max(M.values()) > 2:
print(0)
else:
... |
s096508677 | p03523 | u167908302 | 1569281392 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 174 | coding:utf-8
import re
s = input()
#正規表現でひっかける
pattern = 'A?KIHA?BARA?$'
result = re.match(pattern , s)
if result:
print('Yes')
else:
print('No') |
s185941350 | p03523 | u296518383 | 1569047764 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 227 | S=input()
T=["AKIHABARA","AKIHABAR","AKIHABRA","AKIHBARA","KIHABARA"]
T+=["AKIHABR","AKIHBAR","KIHABAR","AKIHBRA","KIHABRA","KIHBARA"]
T+=["KIHABR","KIHBAR","KIHBRA","AKIHBR","KIHBR"]
#print(T)
prin("YES" if S in T else "NO") |
s178237565 | p03523 | u296150111 | 1568249559 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 208 | s=input()
p="KIHBR"
j=0
c=0
for i in range(len(s)):
if s[i]==p[j]:
j+=1
c=0
elif s[i]=="A" and j!=1 and c==0:
c+=1
continue
else:
print("NO")
exit()
if j==5:
print("YES")
else:
print("NO")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.