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
s424155764
p03854
u397496203
1600311828
Python
PyPy3 (7.3.0)
py
Runtime Error
295
256372
739
import sys # sys.setrecursionlimit(100000) def input(): return sys.stdin.readline().strip() def input_int(): return int(input()) def input_int_list(): return [int(i) for i in input().split()] def main(): S = input() # 再帰的に解いて解く def solver(T): if T == "": print("YES")...
s759062611
p03854
u301590311
1600060195
Python
Python (3.8.2)
py
Runtime Error
29
9868
409
S = input() def is_equal_to(str, start_ind): words = ["dream", "dreamer", "erase", "eraser"] if start_ind == len(str): return True for i in range(len(words)): if str[start_ind : start_ind+len(words[i])] == words[i]: if is_equal_to(str, start_ind+len(words[i])): r...
s107988426
p03854
u301590311
1600060029
Python
Python (3.8.2)
py
Runtime Error
34
9944
392
S = input() def is_equal_to(str, start_ind): words = ["dream", "dreamer", "erase", "eraser"] if start_ind == len(str): return True for i in range(len(words)): if str[start_ind : start_ind+len(words[i])] == words[i]: if is_equal_to(str, start_ind+len(words[i])): r...
s554440350
p03854
u794448346
1600028715
Python
Python (3.8.2)
py
Runtime Error
38
9152
320
S = input() i = 0 while i <= len(S)-5: if S[i:i+5] == "dream": i += 5 if S[i:i+2] == "er" and S[i:i+5] != "erase": i += 2 elif S[i:i+5] == "erase": i += 5 if S[i] == "r": i += 1 else: break if i != len(S): print("NO") else: print("YES")
s100228879
p03854
u980205854
1599782148
Python
PyPy3 (7.3.0)
py
Runtime Error
91
74568
2627
import sys from sys import exit from collections import deque from bisect import bisect_left, bisect_right, insort_left, insort_right from heapq import heapify, heappop, heappush from itertools import product, permutations, combinations, combinations_with_replacement from functools import reduce from math import gcd, s...
s990654670
p03854
u755180064
1599708850
Python
Python (3.8.2)
py
Runtime Error
28
9168
243
url = "https://atcoder.jp//contests/abc049/tasks/abc049_b" def main(): h, w = list(map(int, input().split())) ss = [input() for _ in range(h)] for s in ss: print(s) print(s) if __name__ == '__main__': main()
s469554434
p03854
u419963262
1599605484
Python
Python (3.8.2)
py
Runtime Error
421
712236
470
import sys sys.setrecursionlimit(10000) s = 'HAKUTYUMU' + input() def check(s): next_s = s if s[-5:] == 'dream': next_s = s[:-5] if s[-7:] == 'dreamer': next_s = s[:-7] if s[-5:] == 'erase': next_s = s[:-5] if s[-6:] == 'eraser': next_s = s[:-6] if s == 'HAKU...
s924205497
p03854
u419963262
1599604028
Python
PyPy3 (7.3.0)
py
Runtime Error
242
252892
429
s = 'HAKUTYUMU' + input() def check(s): next_s = s if s[-5:] == 'dream': next_s = s[:-5] if s[-7:] == 'dreamer': next_s = s[:-7] if s[-5:] == 'erase': next_s = s[:-5] if s[-6:] == 'eraser': next_s = s[:-6] if s == 'HAKUTYUMU': return True if s == ...
s698922951
p03854
u419963262
1599603784
Python
Python (3.8.2)
py
Runtime Error
81
104064
429
s = 'HAKUTYUMU' + input() def check(s): next_s = s if s[-5:] == 'dream': next_s = s[:-5] if s[-7:] == 'dreamer': next_s = s[:-7] if s[-5:] == 'erase': next_s = s[:-5] if s[-6:] == 'eraser': next_s = s[:-6] if s == 'HAKUTYUMU': return True if s == ...
s957655834
p03854
u985085517
1599424523
Python
Python (3.8.2)
py
Runtime Error
28
10036
664
#!/user/bin/env pypy3 import itertools import sys def fast_input(): return sys.stdin.readline()[:-1] def print_format(b: bool) -> str: return "YES" if b else "NO" def solve(s: str) -> bool: tokens = ["dream", "erase", "eraser", "dreamer"] def dfs(pos: int) -> bool: if pos == len(s): ...
s595199315
p03854
u549579601
1599363746
Python
PyPy3 (7.3.0)
py
Runtime Error
265
255192
514
ans = [] def solve(s): if s == 'dream' or s == 'dreamer' or s == 'erase' or s == 'eraser': ans.append(1) else: if len(s) >=5 and s[:5] == 'dream': solve(s[5:]) if len(s) >=7 and s[:7] == 'dreamer': solve(s[7:]) if len(s) >=5 and s[:5] == 'erase': ...
s440128065
p03854
u231095456
1599299494
Python
Python (3.8.2)
py
Runtime Error
110
105456
948
S = input() def trans(s,i): if s == "": return "YES" if i == 0: t = s[:5] if t == "dream": return trans(s[5:],1) elif t == "erase": return trans(s[5:],2) else: return "NO" elif i == 1: if s[:5] == "dream": return...
s094666234
p03854
u819135704
1598908503
Python
Python (3.8.2)
py
Runtime Error
27
9124
1473
S = list(input()) N = len(S) def f(x): print(x) exit() if N < 5: f("NO") elif S[0] == "d": w = 1 elif S[0] == "e": w = -1 else: f("NO") i = 0 while True: if w > 0: if S[i]+S[i+1]+S[i+2]+S[i+3]+S[i+4] == "dream": i += 5 if i == N: f("YES") ...
s004823748
p03854
u165318982
1598553580
Python
Python (3.8.2)
py
Runtime Error
481
137924
286
A = input() A = A[::-1] divide = [i[::-1] for i in ["dream", "dreamer", "erase", "eraser"]] flag = 1 while flag and A: flag = 0 for word in divide: if A.startswith(word): A = A[len(word):] print(A) flag = 1 if len(A) == 0: print('YES') else: print('NO')
s526149185
p03854
u165318982
1598553561
Python
Python (3.8.2)
py
Runtime Error
482
137916
309
A = input() A = A[::-1] divide = [i[::-1] for i in ["dream", "dreamer", "erase", "eraser"]] print(A) print(divide) flag = 1 while flag and A: flag = 0 for word in divide: if A.startswith(word): A = A[len(word):] print(A) flag = 1 if len(A) == 0: print('YES') else: print('NO')
s166318187
p03854
u165318982
1598553519
Python
Python (3.8.2)
py
Runtime Error
483
137900
349
A = input() A = A[::-1] divide = [i[::-1] for i in ["dream", "dreamer", "erase", "eraser"]] flag = 1 while flag and A: flag = 0 for word in divide: if A.startswith(word): # 先頭が一致したら A = A[len(word):] # 該当文字分だけスライス print(A) flag = 1 if len(A) == 0: print('Yes') else: print('No')
s902401005
p03854
u771869879
1598490565
Python
Python (3.8.2)
py
Runtime Error
85
104056
303
S = input() text = ['dream','dreamer','erase','eraser'] def search(s): if len(s) == 0: return 1 flg = 0 for t in text: if len(s) < len(t): continue if s.find(t) == 0: flg |= search(s[len(t):]) return flg if search(S): print('YES') else: print('NO')
s642228322
p03854
u771869879
1598490358
Python
Python (3.8.2)
py
Runtime Error
88
104112
264
S = input() text = ['dream','dreamer','erase','eraser'] def search(s): if len(s) == 0: return 1 flg = 0 for t in text: if s.find(t) == 0: flg |= search(s[len(t):]) return flg if search(S): print('YES') else: print('NO')
s037531791
p03854
u607680583
1598411813
Python
Python (3.8.2)
py
Runtime Error
1509
139500
373
s = list(input()) a = list("dream") b = list("dreamer") c = list("erase") d = list("eraser") flag = 0 while(flag == 0): print(s) if s[-7:] == b: del s[-7:] elif s[-6:] == d: del s[-6:] elif s[-5:] == a or s[-5:] == c: del s[-5:] elif s == []: print("YES") fl...
s266331570
p03854
u223663729
1598313471
Python
Python (3.8.2)
py
Runtime Error
32
12600
375
# dfs C = ['dream', 'dreamer', 'erase', 'eraser'] S = input() L = len(S) def dfs(x): l = len(x) if l >= L: if S == x: return True else: return False match = S[l:l+7] for c in C: if match.find(c) == 0: if dfs(x+c): return Tru...
s713752880
p03854
u869790980
1598284692
Python
PyPy2 (7.3.0)
py
Runtime Error
323
85508
209
words = [w[::-1] for w in ['dream','dreamer', 'erase', 'eraser']] s = raw_input()[::-1] while(i < len(s)): for w in words: if w == s[:len(w)]: i += len(w) break print 'YES' if i == len(s) else 'NO'
s897939209
p03854
u463893436
1597949994
Python
Python (3.8.2)
py
Runtime Error
34
10276
181
import re s = input() s = re.sub("dreamer","",s) s = re.sub("dream","",s) s = re.sub("eraser","",s) s = re.sub("erase","",s) if int(s) == 0: print("YES") else: print("NO")
s310457190
p03854
u106778233
1597785201
Python
Python (3.8.2)
py
Runtime Error
49
9816
386
s = input() def search(l): if l>=len(s): return 1 a = b = c = d = 0 if s[l:l+5]=="dream": a = search(l+5) if s[l:l+5]=="erase": b = search(l+5) if s[l:l+6]=="eraser": c = search(l+6) if s[l:l+7]=="dreamer": d = search(l+7) return ...
s604677328
p03854
u106778233
1597784799
Python
Python (3.8.2)
py
Runtime Error
31
9036
321
def search(l): if l>=len(s): return 1 if s[l:l+5]=="dream": search(l+5) if s[l:l+5]=="erase": search(l+5) if s[l:l+6]=="eraser": search(l+6) if s[l:l+7]=="dreamer": search(l+7) else: return 0 if search(0): print("YES") else: print("NO"...
s332293698
p03854
u842170774
1597741086
Python
Python (3.8.2)
py
Runtime Error
111
104184
345
S=input()[::-1] def a(s): if s: if s[:5]=='maerd': return a(s[5:]) elif s[:5]=='esare': return a(s[5:]) elif s[:6]=='resare': return a(s[6:]) elif s[:7]=='remaerd': return a(s[7:]) else: return False else: ...
s587524116
p03854
u190866453
1597632660
Python
Python (3.8.2)
py
Runtime Error
28
9216
187
s = input() list = ["dream", "dreamer", "erase", "eraser"] for i in list: s = s.replace(i, "x") s.sort() if s[0] == s[-1] and s[-1] == "x": print("YES") else: print("NO")
s860541248
p03854
u068646483
1597601552
Python
PyPy3 (7.3.0)
py
Runtime Error
89
68724
356
S = input() strs = list(reversed(S)) rev_S = ''.join(strs) while True: if rev_S[:6] == 'resare' rev_S = rev_S[6:] continue elif rev_S[:7] == 'remaerd': rev_S = rev_S[7:] continue elif rev_S[:5] == 'esare' or rev_S[:5] == 'maerd': rev_S = rev_S[5:] continue else: break if rev_S == ''...
s049336672
p03854
u267549387
1597516103
Python
Python (3.8.2)
py
Runtime Error
438
712384
501
#!/usr/bin/env python3 import sys PARTS = ["eraser", "erase", "dreamer", "dream"] def main(): sys.setrecursionlimit(10000) S = input() if judgeStr(S): print("YES") else: print("NO") def judgeStr(target: str) -> bool: for item in PARTS: if target.startswith(item): ...
s753063850
p03854
u267549387
1597515207
Python
Python (3.8.2)
py
Runtime Error
2214
360416
683
#!/usr/bin/env python3 import sys PARTS = ["eraser", "erase", "dreamer", "dream"] PARTS2 = [] def main(): global PARTS2 sys.setrecursionlimit(5000) S = input() for i in range(0, 4): for j in range(0, 4): PARTS2.append(PARTS[i] + PARTS[j]) PARTS2 = PARTS2 + PARTS if jud...
s172284836
p03854
u267549387
1597514783
Python
PyPy3 (7.3.0)
py
Runtime Error
2226
811052
479
import sys PARTS = ["eraser", "erase", "dreamer", "dream"] def main(): sys.setrecursionlimit(5000) S = input() if judgeStr(S): print("YES") else: print("NO") def judgeStr(target: str) -> bool: for item in PARTS: if target.startswith(item): tempStr = target...
s776433812
p03854
u267549387
1597514687
Python
Python (3.8.2)
py
Runtime Error
286
430492
501
#!/usr/bin/env python3 import sys PARTS = ["eraser", "erase", "dreamer", "dream"] def main(): sys.setrecursionlimit(5000) S = input() if judgeStr(S): print("YES") else: print("NO") def judgeStr(target: str) -> bool: for item in PARTS: if target.startswith(item): ...
s166472021
p03854
u267549387
1597514496
Python
Python (3.8.2)
py
Runtime Error
81
104140
457
#!/usr/bin/env python3 PARTS = ["eraser", "erase", "dreamer", "dream"] def main(): S = input() if judgeStr(S): print("YES") else: print("NO") def judgeStr(target: str) -> bool: for item in PARTS: if target.startswith(item): tempStr = target.replace(item, "", 1) ...
s911977351
p03854
u095094246
1597340835
Python
Python (3.8.2)
py
Runtime Error
33
12572
275
s=input() text=['dream','dreamer','erase','eraser'] def bfs(t): if t == s: return 1 if len(t) >= len(s): return 0 if t != s[:len(t)]: return 0 ans = 0 for tx in text: ans += bfs(t+tx) return ans if bfs('') > 0: print('YES') else: print('NO')
s465820812
p03854
u760961723
1597160323
Python
Python (3.8.2)
py
Runtime Error
1479
140056
428
S =input() ls_S = list(S) ans = "Yes" while len(ls_S) != 0: print(ls_S) if "".join(ls_S[len(ls_S)-5:]) == "dream": ls_S = ls_S[:len(ls_S)-5] elif "".join(ls_S[len(ls_S)-5:]) == "erase": ls_S = ls_S[:len(ls_S)-5] elif "".join(ls_S[len(ls_S)-7:]) == "dreamer": ls_S = ls_S[:len(ls_S)-7] elif "".joi...
s364947799
p03854
u074220993
1597114672
Python
Python (3.8.2)
py
Runtime Error
26
9184
429
s = input() while 1: if len(S) == 0: print("YES") break if s[len(s)-5:] == "dream": s = s[:len(s)-5] continue elif s[len(s)-7:] == "dreamer": s = s[:len(s)-7] continue elif s[len(s)-5:] == "erase": s = s[:len(s)-5] continue elif s[len(s...
s352679399
p03854
u969708690
1597001569
Python
Python (3.8.2)
py
Runtime Error
210
262020
233
import sys sys.setrecursionlimit(10000) def saiki(T): if len(T)<=len(S): if T==S: print("YES") exit() return saiki(T+"dream"),saiki(T+"erase"),saiki(T+"dreamer"),saiki(T+"eraser") S=input() saiki("") print("NO")
s282358877
p03854
u044220565
1596916301
Python
Python (3.8.2)
py
Runtime Error
25
9192
968
# coding: utf-8 import sys #from operator import itemgetter sysread = sys.stdin.buffer.readline read = sys.stdin.buffer.read #from heapq import heappop, heappush #from collections import defaultdict sys.setrecursionlimit(10**7) #import math #from itertools import product, accumulate, combinations, product #import bisec...
s261887777
p03854
u350093546
1596883210
Python
PyPy3 (7.3.0)
py
Runtime Error
163
79388
380
s=input() t='' while s!='': if s[:5]=='dream': if s[5:10]=='erase': s=s[5:] continue elif s[5:7]=='er': s=s[7:] continue else: s=s[5:] continue elif s[:5]=='erase': if s[5]=='r': s=s[6:] continue else: s=s[5:] continue else: ...
s188553369
p03854
u350093546
1596882985
Python
PyPy3 (7.3.0)
py
Runtime Error
91
74532
310
s=input() t='' while s!='': if s[:5]=='dream': if s[5:10]=='erase': s=s[5:] continue elif s[5:7]='er': s=s[7:] continue elif s[:5]=='erase': if s[5]=='r': s=s[6:] else: s=s[5:] else: break if s=='': print('YES') else: print('NO')
s392568842
p03854
u345057610
1596598828
Python
Python (3.8.2)
py
Runtime Error
1727
139856
963
def h(temp): if temp[0] == "m": a = 0 elif temp[0] == "r": if temp[2] == "m": a = 1 else: a = 3 else: a = 2 return a def H(temp,y,a): c = 0 if a == 0 or a == 2: for j in range(5): if y[a][4-j] != temp[0]: ...
s398070615
p03854
u345057610
1596597181
Python
Python (3.8.2)
py
Runtime Error
49
9816
777
def h(temp): if temp[0] == "m": a = 0 elif temp[0] == "r": if temp[2] == "m": a = 1 else: a = 3 else: a = 2 return a def H(temp,y,a): c = 0 if a == 0 or a == 2: for j in range(5): if y[a][4-j] != temp[0]: ...
s143044206
p03854
u345057610
1596597093
Python
Python (3.8.2)
py
Runtime Error
49
9840
777
def h(temp): if temp[0] == "m": a = 0 elif temp[0] == "r": if temp[2] == "m": a = 1 else: a = 3 else: a = 2 return a def H(temp,y,a): c = 0 if a == 0 or a == 2: for j in range(5): if y[a][4-j] != temp[0]: ...
s573596775
p03854
u518414537
1596582592
Python
Python (3.8.2)
py
Runtime Error
49
9936
961
s = list(input()) frag = 0 i = 0 while i < len(s): if len(s) < 5: frag = 1 break if s[i] == "d" and s[i + 1] == "r" and s[i + 2] == "e" and s[i + 3] == "a" and s[i + 4] == "m": if i + 6 < len(s): if s[i + 5] == "e" and s[i + 6] == "r": if s[i + 7] == "a" and s...
s098784865
p03854
u518414537
1596579895
Python
Python (3.8.2)
py
Runtime Error
50
9904
859
s = list(input()) frag = 0 i = 0 while i < len(s): if len(s) < 5: frag = 1 break if s[i] == "d" and s[i + 1] == "r" and s[i + 2] == "e" and s[i + 3] == "a" and s[i + 4] == "m": if i + 9 < len(s): if s[i + 5] == "e" and s[i + 6] == "r" and s[i + 7] == "a" and s[i + 8] == "s" a...
s196371481
p03854
u518414537
1596579730
Python
Python (3.8.2)
py
Runtime Error
50
10076
860
s = list(input()) frag = 0 i = 0 while i < len(s): if len(s) == 0: frag = 1 break if s[i] == "d" and s[i + 1] == "r" and s[i + 2] == "e" and s[i + 3] == "a" and s[i + 4] == "m": if i + 9 < len(s): if s[i + 5] == "e" and s[i + 6] == "r" and s[i + 7] == "a" and s[i + 8] == "s" ...
s701251444
p03854
u518414537
1596579289
Python
Python (3.8.2)
py
Runtime Error
48
10000
809
s = list(input()) frag = 0 i = 0 while i < len(s): if s[i] == "d" and s[i + 1] == "r" and s[i + 2] == "e" and s[i + 3] == "a" and s[i + 4] == "m": if i + 9 < len(s): if s[i + 5] == "e" and s[i + 6] == "r" and s[i + 7] == "a" and s[i + 8] == "s" and s[i + 9] == "e": i += 5 ...
s443510782
p03854
u518414537
1596579003
Python
Python (3.8.2)
py
Runtime Error
50
10016
798
s = list(input()) frag = 0 i = 0 if len(s) == 0: frag = 1 while i < len(s): if s[i] == "d" and s[i + 1] == "r" and s[i + 2] == "e" and s[i + 3] == "a" and s[i + 4] == "m": if i + 7 < len(s): if s[i + 5] == "e" and s[i + 6] == "r" and s[i + 7] == "a": i += 5 co...
s660980404
p03854
u518414537
1596578773
Python
Python (3.8.2)
py
Runtime Error
46
9956
769
s = list(input()) frag = 0 i = 0 while i < len(s): if s[i] == "d" and s[i + 1] == "r" and s[i + 2] == "e" and s[i + 3] == "a" and s[i + 4] == "m": if i + 7 < len(s): if s[i + 5] == "e" and s[i + 6] == "r" and s[i + 7] == "a": i += 5 continue if i + 6 < len...
s590394196
p03854
u518414537
1596578680
Python
Python (3.8.2)
py
Runtime Error
47
10020
803
s = list(input()) frag = 0 i = 0 while i < len(s): if s[i] == "d" and s[i + 1] == "r" and s[i + 2] == "e" and s[i + 3] == "a" and s[i + 4] == "m": if i + 7 < len(s): if s[i + 5] == "e" and s[i + 6] == "r" and s[i + 7] == "a": i += 5 continue if i + 6 < len...
s533864949
p03854
u518414537
1596578550
Python
Python (3.8.2)
py
Runtime Error
32
9964
837
s = list(input()) frag = 0 i = 0 while i < len(s): if s[i] == "d" and s[i + 1] == "r" and s[i + 2] == "e" and s[i + 3] == "a" and s[i + 4] == "m": if i + 7 < len(s): if s[i + 5] == "e" and s[i + 6] == "r" and s[i + 7] == "a": i += 4 continue if i + 6 < len...
s809976967
p03854
u374802266
1596503051
Python
Python (3.8.2)
py
Runtime Error
2217
14028
354
s=input() while s: if s[-5:]=='erase': for i in range(5): s.pop() elif s[-5:]=='dream': for i in range(5): s.pop() elif s[-6:]=='eraser': for i in range(6): s.pop() elif s[-7:]=='dreamer': for i in range(7): s.pop() else...
s059014017
p03854
u374802266
1596502579
Python
Python (3.8.2)
py
Runtime Error
52
12560
348
def test(t): if len(t)==len(s): print('YES') exit() if s[len(t):len(t)+5]=='dream': test(t+'dream') if s[len(t):len(t)+7]=='dreamer': test(t+'dreamer') if s[len(t):len(t)+5]=='erase': test(t+'erase') if s[len(t):len(t)+6]=='eraser': test(t+'eraser') s=...
s467767506
p03854
u935685410
1596088017
Python
PyPy3 (7.3.0)
py
Runtime Error
94
68520
112
import re s = imput() if re.match("(dreamer|dream|eraser|erase)+dreamer",s): print("YES") else: print("NO")
s910153581
p03854
u692690314
1595615602
Python
Python (3.8.2)
py
Runtime Error
48
9760
504
s = input() s_reverse = ''.join(list(reversed(s))) t = '' while True: if s_reverse == t: print('YES') break n = len(t) if s_reverse[n] == 'm': t += ''.join(list(reversed('dream'))) elif s_reverse[n] == 'e': t += ''.join(list(reversed('erase'))) elif s_reverse[n:n+3] ...
s290284975
p03854
u985929170
1595573017
Python
Python (3.8.2)
py
Runtime Error
2372
139492
960
S = input() import re li = ['dream','dreamer','erase','eraser'] while len(list(S)) > 8: if S[0] == 'd': if S[0:5] == 'dream': if S[5:10] == 'erase': S = S[5:] print(S) elif S[5:10] == 'dream': S = S[5:] print(S) ...
s326365170
p03854
u199948227
1595451020
Python
Python (3.8.2)
py
Runtime Error
84
104052
484
WORDS = ['dream', 'dreamer', 'erase', 'eraser'] def main(s): for word in WORDS: if delete_word(s, word): print('YES') break else: print('NO') def delete_word(s, word): if s.endswith(word): s = s[:-len(word)] if len(s) == 0: return True ...
s668313381
p03854
u199948227
1595447540
Python
Python (3.8.2)
py
Runtime Error
84
104044
503
def main(s): for word in ['dream', 'dreamer', 'erase', 'eraser']: if delete_word(s, word): print('YES') break else: print('NO') def delete_word(s, word): if s.startswith(word): s = s[len(word):] if len(s) == 0: return True for w i...
s248549206
p03854
u199948227
1595447087
Python
Python (3.8.2)
py
Runtime Error
85
103808
485
WORDS = ['dream', 'dreamer', 'erase', 'eraser'] def main(s): for word in WORDS: if delete_word(s, word): print('YES') break else: print('NO') def delete_word(s, word): if s.startswith(word): s = s[len(word):] if len(s) == 0: return True...
s924273223
p03854
u199948227
1595446848
Python
Python (3.8.2)
py
Runtime Error
87
103820
491
WORDS = ['dream', 'dreamer', 'erase', 'eraser'] def main(s): for word in WORDS: if delete_word(s, word): print('YES') break else: print('NO') def delete_word(s, word): if s.startswith(word): s = s[len(word):] if len(s) == 0: return True...
s436234003
p03854
u433697974
1595292771
Python
Python (3.8.2)
py
Runtime Error
104
104108
440
def hantei(S): if S == 'dream' or S == 'dreamer' or S == 'erase' or S == 'eraser': return 1 if S[:5] == 'dream': if S[:7] == 'dreamer': return hantei(S[5:]) | hantei(S[7:]) else: return hantei(S[5:]) if S[:5] == 'erase': if S[:6] == 'eraser': return hantei(S[5:]) | hantei(S[6:]) ...
s953994987
p03854
u433697974
1595292644
Python
Python (3.8.2)
py
Runtime Error
23
9012
496
import sys import resource sys.setrecursionlimit(100000) def hantei(S): if S == 'dream' or S == 'dreamer' or S == 'erase' or S == 'eraser': return 1 if S[:5] == 'dream' if S[:7] == 'dreamer' return hantei(S[5:]) | hantei(S[7:]) else: return hantei(S[5:]) if S[:5] == 'erase' if S[:6]...
s229258774
p03854
u433380437
1594961428
Python
PyPy3 (7.3.0)
py
Runtime Error
481
177272
369
s = input() def solve(query): while 1: for frag in ("erase", "eraser", "dream", "dreamer"): if query.endswith(frag): query = query[:-len(frag)] print(query) break else: print("NO") break if not query: ...
s138362307
p03854
u845982808
1594689783
Python
Python (3.8.2)
py
Runtime Error
24
9068
102
S = input() if re.match("^(dream|dreamer|erase|eraser)+$", S): print("Yes") else: print("No")
s462134905
p03854
u845982808
1594689555
Python
Python (3.8.2)
py
Runtime Error
25
9160
102
S = input() if re.match("^(dream|dreamer|erase|eraser)+$", s): print("Yes") else: print("No")
s219608367
p03854
u845982808
1594689458
Python
Python (3.8.2)
py
Runtime Error
25
8988
110
import re s = input() if re.match("^(dream|dreamer|erase|eraser)+$, s): print("Yes") else: print("No")
s375256311
p03854
u786020649
1594627000
Python
Python (3.8.2)
py
Runtime Error
1764
140704
811
from collections import deque import sys def fnw(n,s): sm=deque([]) if n<=len(s): for _ in range(n): sm.append(s.popleft()) return ''.join(sm) def jfws(s): print(s) fws=fnw(5,s) # print(fws) if fws=='dream': fws=fnw(2,s) if fws=='er': if s: ...
s684527027
p03854
u786020649
1594623150
Python
Python (3.8.2)
py
Runtime Error
68
9964
770
from collections import deque import sys def fnw(n,s): sm=deque([]) if n<=len(s): for _ in range(n): sm.append(s.popleft()) return ''.join(sm) def jfws(s): # print(s) fws=fnw(5,s) # print(fws) if fws=='dream': fws=fnw(2,s) if fws=='er': if s[...
s166143473
p03854
u786020649
1594623082
Python
Python (3.8.2)
py
Runtime Error
1807
140700
768
from collections import deque import sys def fnw(n,s): sm=deque([]) if n<=len(s): for _ in range(n): sm.append(s.popleft()) return ''.join(sm) def jfws(s): print(s) fws=fnw(5,s) # print(fws) if fws=='dream': fws=fnw(2,s) if fws=='er': if s[0]...
s668459223
p03854
u786020649
1594622541
Python
Python (3.8.2)
py
Runtime Error
65
10076
755
from collections import deque import sys def fnw(n,s): sm=deque([]) if n<=len(s): for _ in range(n): sm.append(s.popleft()) return ''.join(sm) def jfws(s): fws=fnw(5,s) # print(fws) if fws=='dream': fws=fnw(2,s) if fws=='er': if s[0]=='a': ...
s671426725
p03854
u786020649
1594621936
Python
Python (3.8.2)
py
Runtime Error
66
10008
749
from collections import deque import sys def fnw(n,s): sm=deque([]) if n<=len(s): for _ in range(n): sm.append(s.popleft()) return ''.join(sm) def jfws(s): fws=fnw(5,s) # print(fws) if fws=='dream': fws=fnw(2,s) if fws=='er': if s[0]=='a': ...
s693147848
p03854
u786020649
1594621857
Python
Python (3.8.2)
py
Runtime Error
70
10136
747
from collections import deque import sys def fnw(n,s): sm=deque([]) if n<=len(s): for _ in range(n): sm.append(s.popleft()) return ''.join(sm) def jfws(s): fws=fnw(5,s) print(fws) if fws=='dream': fws=fnw(2,s) if fws=='er': if s[0]=='a': ...
s137075015
p03854
u786020649
1594621629
Python
Python (3.8.2)
py
Runtime Error
23
8932
784
from collections import deque import sys def fnw(n,s): sm=deque([]) if n<=len(s): for _ in range(n): sm.append(s.popleft()) return ''.join(sm) def jfws(s): fws=fnw(5,s) if fws=='dream': fws=fnw(2,s) if fws=='er': if s[0]=='a': s.exten...
s782296335
p03854
u786020649
1594621318
Python
Python (3.8.2)
py
Runtime Error
66
10028
767
from collections import deque import sys def fnw(n,s): sm=deque([]) if n<=len(s): for _ in range(n): sm.append(s.popleft()) return ''.join(sm) def jfws(s): fws=fnw(5,s) if fws=='dream': fws=fnw(2,s) if fws=='er': if s[0]=='a': s.exten...
s084845095
p03854
u786020649
1594621300
Python
Python (3.8.2)
py
Runtime Error
25
9204
470
import sys def eat(i,candies,counter): s=candies[i]+candies[i-1] nc=max(0,s-x) counter+=nc candies[i]-=nc return counter def main(n,x,candies): counter=0 if candies[0]>x: counter=candies[0]-x candies[0]=x for i in range(1,n): counter=eat(i,candies,counter) r...
s328914618
p03854
u747703115
1594131470
Python
Python (3.8.2)
py
Runtime Error
21
9000
130
s = input()replace('dreamer', '').replace('eraser', '').replace('dream', '').replace('erase', ''). print('YES' if s=='' else 'NO')
s550810218
p03854
u294385082
1592661259
Python
Python (3.8.2)
py
Runtime Error
27
10696
573
from collections import deque s = input() q = deque(list(s)) while q: if len(q) >= 5: subs = q.popleft()+q.popleft()+q.popleft()+q.popleft()+q.popleft() if subs != 'erase' and subs != 'dream': print('NO') exit() if subs == 'erase' and len(q) != 0 and q[0] == 'r': q.popleft() if sub...
s434260713
p03854
u925478395
1591653911
Python
Python (3.4.3)
py
Runtime Error
17
2940
109
import rs li = input() if re.match("^(dream|dreamer|erase|eraser)+$", li): print('YSE') else: print('NO')
s451836784
p03854
u925478395
1591653861
Python
Python (3.4.3)
py
Runtime Error
17
2940
124
import rs li = input() flag = 'No' if re.match("^(dream|dreamer|erase|eraser)+$", li): flag = 'YES' print(flag)
s798922535
p03854
u925478395
1591653250
Python
Python (3.4.3)
py
Runtime Error
17
2940
159
li = list(input()) list = ['dream','dreamer','erase','eraser'] flag = 'No' for x in list: for y in list: if x + y = li: flag = 'YES' print(flag)
s894168671
p03854
u269340384
1591580046
Python
Python (3.4.3)
py
Runtime Error
17
2940
1368
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<n; i++) int main(){ string S,T; cin >> S; string dream = "dream"; string dreamer = "dreamer"; string erase = "erase"; string eraser = "eraser"; while(T != S){ int countall = 0; int count1 = 0; for(int i = T.siz...
s605646836
p03854
u951480280
1591560587
Python
Python (3.4.3)
py
Runtime Error
41
3828
611
from collections import deque s = input() n = len(s) deque = deque() deque.append(0) def str_plus(i): s1 = s[i] if s1 == "d": if s[i:i+5] == "dream": if s[i+5:i+7] == "er": return [i+5,i+7] else: return [i+5] if s1 == "e": if s[i:i+5]...
s653696730
p03854
u951480280
1591560123
Python
Python (3.4.3)
py
Runtime Error
43
3828
752
from collections import deque str_l = ["dream", "dreamer", "erase" ,"eraser"] s = input() n = len(s) deque = deque() deque.append(0) def str_plus(i): s1 = s[i] if s1 == "d": if s[i:i+5] == "dream": if s[i+5:i+7] == "er": return [i+5,i+7] else: re...
s880921861
p03854
u818542539
1591471482
Python
Python (3.4.3)
py
Runtime Error
87
9852
657
S = input() U = ['dreamer', 'dream', 'eraser', 'erase'] answer = 'NO' def possible(current): possible = [] for string in U: if S.startswith(current + string): possible.append(string) return possible def judge(current): if current == S: global answer answer = 'YES...
s293435383
p03854
u818542539
1591471107
Python
Python (3.4.3)
py
Runtime Error
89
9864
715
S = input() T = '' U = ['dreamer', 'dream', 'eraser', 'erase'] answer = 'NO' def possible(current): possible = [] for string in U: if S.startswith(current + string): possible.append(string) return possible def judge(current): if current == S: global answer answer...
s371904477
p03854
u742129941
1591338894
Python
Python (3.4.3)
py
Runtime Error
78
4304
348
import sys def add_str(t="",wn=0,s=0): if t == st[s:s+wn] or t == "": if s+wn == len(st): print("YES") sys.exit() add_str("dream", 5, s+wn) add_str("dreamer", 7, s+wn) add_str("erase", 5, s+wn) add_str("eraser", 6, s+wn) else: return st=i...
s034817666
p03854
u844895214
1590954185
Python
Python (3.4.3)
py
Runtime Error
104
7196
463
from sys import stdin def S(): return stdin.readline().rstrip() a = S() def f(t,a): if t == a: return True elif len(a)<len(t): return False else: strl = {0:'dream',1:'dreamer',2:'erase',3:'eraser'} for i in range(4): tmp = strl[i] if t+tmp in a[:len(t...
s205098384
p03854
u363146889
1590921421
Python
PyPy3 (2.4.0)
py
Runtime Error
177
38340
707
# -*- coding: utf-8 -*- ## Library import sys from fractions import gcd import math from math import ceil,floor import collections ## input # n=int(input()) # A,B,C,D=map(int, input().split()) # string = input() # yoko = list(map(int, input().split())) # tate = [int(input()) for _ in range(N)] # N, M = map(int,inpu...
s918961397
p03854
u045628053
1590711759
Python
Python (3.4.3)
py
Runtime Error
19
3188
178
import re output ="NO" s = re.sub('dreamer', '', s) s = re.sub('dream', '', s) s = re.sub('eraser', '', s) s = re.sub('erase', '', s) if s == "": output = "YES" print(output)
s367993315
p03854
u243312682
1590687949
Python
Python (3.4.3)
py
Runtime Error
24
4900
530
import re def main(): s = list(input()) sr = ''.join(list(reversed(s))) t = ['dream', 'dreamer', 'erase', 'eraser'] tr = list() for i in t: tr.append(''.join(list(reversed(i)))) while sr: flag = False for i in tr: if sr.startswith(i): sr = sr....
s126759192
p03854
u558981240
1590600941
Python
Python (3.4.3)
py
Runtime Error
2104
3188
512
s = input() dr = "dream" dre = "dreamer" er = "erase" era = "eraser" dr = dr[::-1] dre = dre[::-1] er = er[::-1] era = era[::-1] s = s[::-1] flag = True while True: if len(s) == 0: break elif s.startswith(dr): s.replace(dr, "", 1) elif s.startswith(dre): s.replace(dre, "", 1) ...
s230825168
p03854
u558981240
1590600106
Python
Python (3.4.3)
py
Runtime Error
18
3188
511
s = input() dr = "dream" dre = "dreamer" er = "erase" era = "eraser" dr = dr[::-1] dre = dre[::-1] er = er[::-1] era = era[::-1] s = s[::-1] flag = True while True: if s.length == 0: break elif s.startswith(dr): s.replace(dr, "", 1) elif s.startswi(dre): s.replace(dre, "", 1) ...
s091528486
p03854
u919025034
1590196622
Python
PyPy3 (2.4.0)
py
Runtime Error
179
38256
533
IN = iter(Input.split('\n')).__next__ def input(): return IN() #ここから先 S=input() T=[] l=-1 while l>=-len(S): if S[l]=="r": if l-2<-len(S): print("NO");break elif S[l-2]=="s": T+="eraser"[::-1] l-=6 else: T+="dreamer"[::-1] l-=7...
s916947436
p03854
u851469594
1590036008
Python
Python (3.4.3)
py
Runtime Error
74
3188
508
S = input() while True: if len(S) == 0: print('YES') exit() if len(S) < 5: print('NO') exit() if S[:5] == 'dream': if len(S) > 6 and S[5:7] == 'er': if S[7] == 'a': S = S[5:] else : S = S[7:] else : ...
s007977811
p03854
u851469594
1590035644
Python
Python (3.4.3)
py
Runtime Error
71
3188
484
S = input() i = 0 while True: if len(S) == 0: print('YES') exit() if len(S) < 5: print('NO') exit() if S[:5] == 'dream': if S[5:7] == 'er': if S[7] == 'a': S = S[5:] else : S = S[7:] else : S...
s174694088
p03854
u324197506
1589901042
Python
Python (3.4.3)
py
Runtime Error
31
3316
838
s = input() vocabs = ["dream","dreamer","erase","eraser"] cnt = 0 t = "" while cnt <= len(s) - 7: if s[cnt] == "d": if s[cnt+5] == "d": cnt += 5 t += vocabs[0] elif s[cnt+5] == "e": if s[cnt+7] == "a": cnt += 5 t += vocabs[0] ...
s909708358
p03854
u000842852
1589821776
Python
Python (3.4.3)
py
Runtime Error
18
3064
387
スコード Copy Copy def main(): S = input() while len(S)>=5: if len(S)>=7 and S[-7:]=="dreamer": S = S[:-7] continue elif len(S)>=6 and S[-6:]=="eraser": S = S[:-6] continue elif S[-5:]=="dream" or S[-5:]=="erase": S = S[:-5] continue else: break if len(...
s379182398
p03854
u981449436
1589686224
Python
Python (3.4.3)
py
Runtime Error
251
156660
528
def dfs(string): can = ["dream", "dreamer", "erase", "eraser"] stack = [] stack.append("dream") stack.append("dreamer") stack.append("erase") stack.append("eraser") while stack: judge = stack.pop() if judge == string:break for temp in can: ans = judge + te...
s638103531
p03854
u738622346
1589481692
Python
Python (3.4.3)
py
Runtime Error
18
2940
440
div = ["dream", "dreamer", "erase", "eraser"] rev = [] t = "" s_rev = s[::-1] for d in div: rev.append(d[::-1]) result = True i = 0 while i < len(s): can_divide = False for d in rev: if len(s_rev) - i >= len(d): if s_rev[i:i + len(d)] == d: can_divide = True i += ...
s764707244
p03854
u738622346
1589481584
Python
Python (3.4.3)
py
Runtime Error
18
3064
487
div = ["dream", "dreamer", "erase", "eraser"] rev = [] t = "" s_rev = s[::-1] for d in div: rev.append(d[::-1]) result = True i = 0 while i < len(s): can_divide = False for d in rev: print("rev:%d i:%d d:%d" % (len(s_rev), i, len(d))) if len(s_rev) - i > len(d) and s_rev[i:i + len(d)] == d:...
s119262475
p03854
u738622346
1589481495
Python
Python (3.4.3)
py
Runtime Error
18
3064
488
div = ["dream", "dreamer", "erase", "eraser"] rev = [] t = "" s_rev = s[::-1] for d in div: rev.append(d[::-1]) result = True i = 0 while i < len(s): can_divide = False for d in rev: print("rev:%d i:%d d:%d" % (len(s_rev), i, len(d))) if len(s_rev) - i >= len(d) and s_rev[i:i + len(d)] == d...