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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s153315627 | p03488 | u654470292 | 1581742401 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2000 | 1040452 | 1072 | import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
return sys.stdin.readline()[:-1]
mod=pow(10,9)+7
s=input()
x,y=map(int,input().split())
lst=[[],[]]
cnt=0
tmp=0
for i in range(len(s)... |
s747475921 | p03488 | u392319141 | 1581707850 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3188 | 475 | S = input()
X, Y = map(int, input().split())
A = [0]
for s in S:
if s == 'T':
A.append(0)
else:
A[-1] += 1
B = [n for n in A[1:: 2]]
X -= A[0]
A = [n for n in A[2:: 2]]
def canGo(nums, g):
if not nums:
return g == 0
bias = sum(nums) + 10
g += bias
dp = (1 << bias)
... |
s566874593 | p03488 | u392319141 | 1581707785 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3188 | 470 | S = input()
X, Y = map(int, input().split())
A = [0]
for s in S:
if s == 'T':
A.append(0)
else:
A[-1] += 1
B = [n for n in A[1:: 2]]
X -= A[0]
A = [n for n in A[2:: 2]]
def canGo(nums, g):
if not nums:
return g == 0
bias = sum(nums)
g += bias
dp = (1 << bias)
for... |
s962789194 | p03488 | u296518383 | 1581536432 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38256 | 781 | S = input()
X, Y = map(int, input().split())
def run_length(s) -> list:
res = [[s[0], 1]]
for i in range(1, len(s)):
if res[-1][0] == s[i]:
res[-1][1] += 1
else:
res.append([s[i], 1])
return res
RL = run_length(S)
if RL[0][0] == 'T':
RL = [['F', 0]] + RL
SIZE =... |
s369289462 | p03488 | u102445737 | 1581521212 | Python | PyPy3 (2.4.0) | py | Runtime Error | 549 | 165852 | 1021 | from sys import stdout
printn = lambda x: stdout.write(str(x))
inn = lambda : int(input())
inl = lambda: list(map(int, input().split()))
inm = lambda: map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 999999999
R = 10**9 + 7
def ddprint(x):
if DBG:
print(x)
def foo(f... |
s714628546 | p03488 | u102445737 | 1581520638 | Python | Python (3.4.3) | py | Runtime Error | 2134 | 499572 | 982 | from sys import stdout
printn = lambda x: stdout.write(str(x))
inn = lambda : int(input())
inl = lambda: list(map(int, input().split()))
inm = lambda: map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 999999999
R = 10**9 + 7
def ddprint(x):
if DBG:
print(x)
k = 8000
... |
s659746637 | p03488 | u985963315 | 1581290597 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 763 | order = list(map(len, input().split("T")))
x, y = map(int, input().split())
ans = "No"
longi = [order[i] for i in range(len(order)) if i % 2 == 0]
lati = [order[i] for i in range(len(order)) if i % 2 == 1]
def f(x, y, A, B, D):
for p in A:
if x > 0:
x -= p
else:
x += p
if x == 0:
for... |
s453935030 | p03488 | u985963315 | 1581290467 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3188 | 762 | order = list(map(len, input().split("T")))
x, y = map(int, input().split())
ans = "No"
longi = [order[i] for i in range(len(order)) if i % 2 == 0]
lati = [order[i] for i in range(len(order)) if i % 2 == 1]
def f(x, y, A, B, D):
for p in A:
if x > 0:
x -= p
else:
x += p
if x == 0:
for... |
s224015299 | p03488 | u144913062 | 1581042807 | Python | Python (3.4.3) | py | Runtime Error | 946 | 3188 | 671 | import sys
input = sys.stdin.readline
def check(arr, x):
s = sum(arr)
if (s+x) % 2 == 1:
return False
target = (s+x) // 2
dp = [False] * (target+1)
dp[0] = True
for a in arr:
for i in range(a, target+1):
dp[i] = dp[i-a]
return dp[-1]
s = input().rstrip() + 'T'... |
s680996324 | p03488 | u071680334 | 1580877467 | Python | Python (3.4.3) | py | Runtime Error | 202 | 3188 | 1202 | import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline
def main():
order_F = []
order_F = input().rstrip().split('T')
x, y = map(int, input().split())
distance = [len(order_F[i]) for i in range(len(order_F))]
dp_len = max(distance) + 1
vert_DP = [False] * (dp_len + 1)
side_DP =... |
s004787300 | p03488 | u071680334 | 1580877363 | Python | Python (3.4.3) | py | Runtime Error | 201 | 3188 | 1198 | import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline
def main():
order_F = []
order_F = input().rstrip().split('T')
x, y = map(int, input().split())
distance = [len(order_F[i]) for i in range(len(order_F))]
dp_len = max(distance)
vert_DP = [False] * (dp_len + 1)
side_DP = [Fa... |
s368495159 | p03488 | u970899068 | 1580656713 | Python | PyPy3 (2.4.0) | py | Runtime Error | 420 | 111964 | 1163 | import sys
input = sys.stdin.readline
s = list(input())
x, y = map(int, input().split())
y = abs(y)
s.append('T')
x1 = []
y1 = []
count = 0
u = 0
for i in range(len(s)):
if s[i] == 'F':
count += 1
else:
if u % 2 == 0:
x1.append(count)
u += 1
count = 0
... |
s487957880 | p03488 | u970899068 | 1580656681 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38384 | 1370 | import sys
input = sys.stdin.readline
s = list(input())
x, y = map(int, input().split())
y = abs(y)
s.append('T')
x1 = []
y1 = []
count = 0
u = 0
for i in range(len(s)):
if s[i] == 'F':
count += 1
else:
if u % 2 == 0:
x... |
s624751713 | p03488 | u970899068 | 1580654816 | Python | PyPy3 (2.4.0) | py | Runtime Error | 413 | 112732 | 998 | import sys
input = sys.stdin.readline
s=list(input())
x,y = map(int, input().split())
x=abs(x)
y=abs(y)
s.append('T')
x1=[]
y1=[]
count=0
u=0
for i in range(len(s)):
if s[i]=='F':
count+=1
else:
if u%2==0:
x1.append(count)
u+=1
count=0
else:
... |
s437158893 | p03488 | u970899068 | 1580651763 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2114 | 174852 | 1280 | import sys
input = sys.stdin.readline
s=list(input())
x,y = map(int, input().split())
s.append('T')
x1=[]
y1=[]
count=0
u=0
for i in range(len(s)):
if s[i]=='F':
count+=1
else:
if u%2==0:
x1.append(count)
u+=1
count=0
else:
y1.append(count... |
s859029755 | p03488 | u970899068 | 1580650979 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2114 | 176900 | 1373 | import sys
input = sys.stdin.readline
s=list(input())
x,y = map(int, input().split())
s.append('T')
x1=[]
y1=[]
count=0
u=0
for i in range(len(s)):
if s[i]=='F':
count+=1
else:
if u%2==0:
x1.append(count)
u+=1
count=0
else:
y1.append(count... |
s863573411 | p03488 | u970899068 | 1580649164 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2114 | 175108 | 1551 | import sys
input = sys.stdin.readline
s=list(input())
x,y = map(int, input().split())
s.append('T')
x1=[]
y1=[]
count=0
u=0
for i in range(len(s)):
if s[i]=='F':
count+=1
else:
if u%2==0:
x1.append(count)
u+=1
count=0
else:
y1.append(count... |
s220625486 | p03488 | u970899068 | 1580648984 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2115 | 177044 | 1514 | s=list(input())
x,y = map(int, input().split())
s.append('T')
x1=[]
y1=[]
count=0
u=0
for i in range(len(s)):
if s[i]=='F':
count+=1
else:
if u%2==0:
x1.append(count)
u+=1
count=0
else:
y1.append(count)
u+=1
count=0... |
s389621394 | p03488 | u970899068 | 1580647985 | Python | PyPy3 (2.4.0) | py | Runtime Error | 769 | 174216 | 895 | s=list(input())
x,y = map(int, input().split())
s.append('T')
x1=[]
y1=[]
count=0
u=0
for i in range(len(s)):
if s[i]=='F':
count+=1
else:
if u%2==0:
x1.append(count)
u+=1
count=0
else:
y1.append(count)
u+=1
count=0... |
s546420518 | p03488 | u970899068 | 1580647768 | Python | PyPy3 (2.4.0) | py | Runtime Error | 768 | 174088 | 1027 | s=list(input())
x,y = map(int, input().split())
s.append('T')
x1=[]
y1=[]
count=0
u=0
for i in range(len(s)):
if s[i]=='F':
count+=1
else:
if u%2==0:
x1.append(count)
u+=1
count=0
else:
y1.append(count)
u+=1
count=0... |
s012176650 | p03488 | u970899068 | 1580604067 | Python | PyPy3 (2.4.0) | py | Runtime Error | 761 | 174216 | 935 | s=list(input())
x,y = map(int, input().split())
s.append('T')
x1=[]
y1=[]
count=0
u=0
for i in range(len(s)):
if s[i]=='F':
count+=1
else:
if u%2==0:
x1.append(count)
u+=1
count=0
else:
y1.append(count)
u+=1
count=0... |
s379479367 | p03488 | u936985471 | 1579653395 | Python | PyPy3 (2.4.0) | py | Runtime Error | 398 | 43996 | 1091 | S=input()
x,y=map(int,input().split())
import itertools
Xmove=[]
Ymove=[]
Xbase=0
Ybase=0
Xtar=True
for key,g in itertools.groupby(S):
num=len(list(g))
if key=="T":
if num%2==1:
Xtar^=True
else:
if Xtar:
Xmove.append(num)
Xbase+=num
else:
Ymove.append(num)
Ybase+=num
if X... |
s978326823 | p03488 | u936985471 | 1579653361 | Python | Python (3.4.3) | py | Runtime Error | 2108 | 3572 | 1091 | S=input()
x,y=map(int,input().split())
import itertools
Xmove=[]
Ymove=[]
Xbase=0
Ybase=0
Xtar=True
for key,g in itertools.groupby(S):
num=len(list(g))
if key=="T":
if num%2==1:
Xtar^=True
else:
if Xtar:
Xmove.append(num)
Xbase+=num
else:
Ymove.append(num)
Ybase+=num
if X... |
s436370177 | p03488 | u936985471 | 1579653208 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3572 | 1091 | S=input()
x,y=map(int,input().split())
import itertools
Xmove=[]
Ymove=[]
Xbase=0
Ybase=0
Xtar=True
for key,g in itertools.groupby(S):
num=len(list(g))
if key=="T":
if num%2==1:
Xtar^=True
else:
if Xtar:
Xmove.append(num)
Xbase+=num
else:
Ymove.append(num)
Ybase+=num
if X... |
s757585682 | p03488 | u644907318 | 1579618834 | Python | PyPy3 (2.4.0) | py | Runtime Error | 426 | 172424 | 1502 | s = input().strip()
x,y = map(int,input().split())
C = {}
cur = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
C[cur] = cnt
cur += 1
cnt = 0
C[cur] = cnt
AX = []
AY = []
for a in C:
if a>0 and a%2==0 and C[a]>0:
AX.append(C[a])
elif a%2==1 and C[a]... |
s372221175 | p03488 | u644907318 | 1579616303 | Python | PyPy3 (2.4.0) | py | Runtime Error | 434 | 172424 | 1246 | s = input().strip()
x,y = map(int,input().split())
C = {}
cur = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
C[cur] = cnt
cur += 1
cnt = 0
C[cur] = cnt
AX = []
AY = []
for a in C:
if a>0 and a%2==0 and C[a]>0:
AX.append(C[a])
elif a%2==1 and C[a]... |
s026207242 | p03488 | u936985471 | 1579470972 | Python | Python (3.4.3) | py | Runtime Error | 2108 | 3572 | 1261 | S=input()
x,y=map(int,input().split())
Xmove=[]
Ymove=[]
xdist=True
cnt=0
for i in range(len(S)):
if S[i]=="T":
if xdist:
Xmove.append(cnt)
else:
Ymove.append(cnt)
cnt=0
xdist^=True
else:
cnt+=1
if S[-1]=="F":
if xdist:
Xmove.append(cnt)
else:
Ymove.append(cnt)
Xbase=sum... |
s327379260 | p03488 | u936985471 | 1579452287 | Python | PyPy3 (2.4.0) | py | Runtime Error | 673 | 172552 | 958 | S=input()
x,y=map(int,input().split())
Xmove=[]
Ymove=[]
xdist=True
cnt=0
for i in range(len(S)):
if S[i]=="T":
if xdist:
Xmove.append(cnt)
else:
Ymove.append(cnt)
cnt=0
xdist^=True
else:
cnt+=1
if S[-1]=="F":
if xdist:
Xmove.append(cnt)
else:
Ymove.append(cnt)
Xmax=sum(... |
s889082780 | p03488 | u934868410 | 1579094390 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1459 | 54800 | 964 | import datetime
s = input()
x, y = map(int, input().split())
#print(datetime.datetime.now())
num_of_f = 0
for c in s:
if c == 'F':
num_of_f += 1
dp = [[[False] * (num_of_f * 4 + 1) for _ in range(2)] for _ in range(2)]
dp[0][0][0] = True
dp[0][1][0] = True
# print(dp)
index = 0
while index < len(s) and s[... |
s095587487 | p03488 | u934868410 | 1579094293 | Python | PyPy3 (2.4.0) | py | Runtime Error | 1439 | 53848 | 964 | import datetime
s = input()
x, y = map(int, input().split())
#print(datetime.datetime.now())
num_of_f = 0
for c in s:
if c == 'F':
num_of_f += 1
dp = [[[False] * (num_of_f * 4 + 1) for _ in range(2)] for _ in range(2)]
dp[0][0][0] = True
dp[0][1][0] = True
# print(dp)
index = 0
while index < len(s) and s[... |
s383169546 | p03488 | u934868410 | 1578997905 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 39280 | 427 | s = input()
x,y = map(int, input().split())
dp = [[False]*32001 for i in range(2)]
index = 0
while s[index] == 'F':
index += 1
x -= index
dp_index = 1
for i in range(index, len(s)):
num = 0
while s[i] == 'F':
num += 1
i += 1
for i in range(-8000, 8001):
dp[dp_index][i] = dp[dp_index][i-num] or dp[d... |
s660979852 | p03488 | u476604182 | 1578869506 | Python | PyPy3 (2.4.0) | py | Runtime Error | 442 | 167004 | 782 | s = input()
x, y = map(int, input().split())
N = len(s)
a = []
b = []
c = 0
n = 0
for i in range(len(s)):
if s[i]=='F':
n += 1
else:
if c%2==0:
a += [n]
else:
b += [n]
c += 1
n = 0
if c%2==0:
a += [n]
else:
b += [n]
sa = sum(a)
sb = sum(b)
dpa = [[0]*(2*sa+1) for i in range(len(a... |
s143835446 | p03488 | u476604182 | 1578706895 | Python | PyPy3 (2.4.0) | py | Runtime Error | 313 | 44508 | 1159 | s = input()
x, y = map(int, input().split())
N = len(s)
a = []
b = []
c = 0
n = 0
for i in range(len(s)):
if s[i]=='F':
n += 1
else:
if c%2==0:
a += [n]
else:
b += [n]
c += 1
n = 0
if c%2==0:
a += [n]
else:
b += [n]
sa = sum(a)
sb = sum(b)
dpa1 = [0]*(2*sa+1)
dpa2 = [0]*(2*sa+1)... |
s707664715 | p03488 | u476604182 | 1578706392 | Python | PyPy3 (2.4.0) | py | Runtime Error | 341 | 44764 | 1313 | s = input()
x, y = map(int, input().split())
N = len(s)
a = []
b = []
c = 0
n = 0
for i in range(len(s)):
if s[i]=='F':
n += 1
else:
if c%2==0:
a += [n]
else:
b += [n]
c += 1
n = 0
if c%2==0:
a += [n]
else:
b += [n]
sa = sum(a)
sb = sum(b)
dpa1 = [0]*(2*sa+1)
dpa2 = [0]*(2*sa+... |
s454021916 | p03488 | u121921603 | 1578495802 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 5620 | 1259 | s=input()
X,Y=map(int,input().split())
import copy
def solve(a,G):
amax=0
for i in a:
amax+=abs(i)
if amax==0:
if G==0:
return True
else:
return False
if a[0]==G:
return True
dp=[[0]*2*amax for _ in range(3)]
dp[0][a[0]]=1
for i in ran... |
s018052818 | p03488 | u121921603 | 1578495756 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2114 | 161308 | 1259 | s=input()
X,Y=map(int,input().split())
import copy
def solve(a,G):
amax=0
for i in a:
amax+=abs(i)
if amax==0:
if G==0:
return True
else:
return False
if a[0]==G:
return True
dp=[[0]*2*amax for _ in range(3)]
dp[0][a[0]]=1
for i in ran... |
s737167147 | p03488 | u121921603 | 1578495467 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2114 | 163080 | 1224 | s=input()
X,Y=map(int,input().split())
import copy
def solve(a,G):
amax=0
for i in a:
amax+=abs(i)
if amax==0:
if G==0:
return True
else:
return False
dp=[[0]*2*amax for _ in range(3)]
dp[0][a[0]]=1
for i in range(1,len(a)):
p=a[i]
... |
s780841398 | p03488 | u121921603 | 1578495341 | Python | PyPy3 (2.4.0) | py | Runtime Error | 190 | 40816 | 1222 | s=input()
X,Y=map(int,input().split())
import copy
def solve(a,G):
amax=0
for i in a:
amax+=abs(i)
if amax==0:
if G==0:
return True
else:
return False
dp=[[0]*2*amax for _ in range(3)]
dp[0][a[0]]=1
for i in range(1,len(a)):
p=a[i]
... |
s945588891 | p03488 | u121921603 | 1578494745 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2161 | 851604 | 1118 | s=input()
X,Y=map(int,input().split())
import copy
def solve(a,G):
amax=0
for i in a:
amax+=abs(i)
dp=[[0]*2*amax for _ in range(len(a))]
dp[0][a[0]]=1
for i in range(1,len(a)):
p=a[i]
for j in range(-amax,amax):
dp[i][j-p]+=dp[i-1][j]
dp[i][j+p]+=dp[... |
s346680002 | p03488 | u121921603 | 1578464871 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2160 | 927752 | 781 | s=input()
X,Y=map(int,input().split())
def solve(a,G):
dp=[[0]*16001 for _ in range(len(x))]
dp[0][a[0]]=1
for i in range(1,len(a)):
for j in range(-8001,8001):
dp[i][j-a[i]]+=dp[i-1][j]
dp[i][j+a[i]]+=dp[i-1][j]
#print(dp)
if dp[i][G]>=1:
... |
s223494535 | p03488 | u121921603 | 1578464415 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2185 | 1113224 | 835 | s=input()
X,Y=map(int,input().split())
def solve(a,G):
dp=[[0]*20000 for _ in range(len(x))]
dp[0][a[0]]=1
for i in range(1,len(a)):
for j in range(-9000,9000):
dp[i][j-a[i]]+=dp[i-1][j]
dp[i][j+a[i]]+=dp[i-1][j]
#print(dp)
for i in range(len(a)):
if... |
s893548738 | p03488 | u121921603 | 1578459803 | Python | PyPy3 (2.4.0) | py | Runtime Error | 228 | 49904 | 826 | s=input()
X,Y=map(int,input().split())
def solve(a,G):
dp=[[0]*20 for _ in range(len(x))]
dp[0][a[0]]=1
for i in range(1,len(a)):
for j in range(-9,9):
dp[i][j-a[i]]+=dp[i-1][j]
dp[i][j+a[i]]+=dp[i-1][j]
#print(dp)
for i in range(len(a)):
if dp[i][G]... |
s506935269 | p03488 | u073852194 | 1577938322 | Python | PyPy3 (2.4.0) | py | Runtime Error | 645 | 168968 | 958 | S = input()+'T'
X,Y = map(int,input().split())
xmove = []
ymove = []
tmp = 0
flag = True
for i in range(len(S)):
if S[i]=='F':
tmp += 1
elif flag and S[i]=='T':
xmove.append(tmp*2)
tmp = 0
flag = False
else:
ymove.append(tmp*2)
tmp = 0
flag = True
... |
s089011076 | p03488 | u073852194 | 1577937849 | Python | PyPy3 (2.4.0) | py | Runtime Error | 599 | 168968 | 798 | S = input()+'T'
X,Y = map(int,input().split())
xmove = []
ymove = []
tmp = 0
flag = True
for i in range(len(S)):
if S[i]=='F':
tmp += 1
elif flag and S[i]=='T':
xmove.append(tmp*2)
tmp = 0
flag = False
else:
ymove.append(tmp*2)
tmp = 0
flag = True
x... |
s947011066 | p03488 | u073852194 | 1577937761 | Python | Python (3.4.3) | py | Runtime Error | 2112 | 135540 | 798 | S = input()+'T'
X,Y = map(int,input().split())
xmove = []
ymove = []
tmp = 0
flag = True
for i in range(len(S)):
if S[i]=='F':
tmp += 1
elif flag and S[i]=='T':
xmove.append(tmp*2)
tmp = 0
flag = False
else:
ymove.append(tmp*2)
tmp = 0
flag = True
x... |
s837821131 | p03488 | u254871849 | 1577345884 | Python | Python (3.4.3) | py | Runtime Error | 1665 | 3316 | 1158 | import sys
s = sys.stdin.readline().rstrip()
x, y = map(int, sys.stdin.readline().split())
def reachable(deltas, goal):
if not deltas:
if goal == 0:
return True
else:
return False
s = sum(deltas)
res = [False] * (s * 2 + 1)
res[s] = True
for d in ... |
s474138900 | p03488 | u588341295 | 1577206439 | Python | Python (3.4.3) | py | Runtime Error | 44 | 13940 | 1550 | # -*- coding: utf-8 -*-
import sys
def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a... |
s278915830 | p03488 | u814986259 | 1577161774 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3316 | 781 | s = list(input().split("T"))
x, y = map(int, input().split())
s2 = [len(x) for x in s]
pos = [0, 0]
LR = [s2[i] for i in range(len(s2)) if i % 2 == 0]
UD = [s2[i] for i in range(len(s2)) if i % 2 == 1]
flag = False
tmp = 1
tmp = tmp << sum(LR)
for d in LR:
tmp = tmp << d | tmp >> d
if x >= 0:
tmp = tmp >> sum... |
s480700421 | p03488 | u814986259 | 1577161609 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3316 | 778 | s = list(input().split("T"))
x, y = map(int, input().split())
s2 = [len(x) for x in s]
pos = [0, 0]
LR = [s2[i] for i in range(len(s2)) if i % 2 == 0]
UD = [s2[i] for i in range(len(s2)) if i % 2 == 1]
flag = False
tmp = 1
tmp = tmp << sum(LR)
for d in LR:
tmp = tmp << d | tmp >> d
if x >= 0:
tmp = tmp >> sum... |
s908955199 | p03488 | u814986259 | 1577161163 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3316 | 762 | s = list(input().split("T"))
x, y = map(int, input().split())
s2 = [len(x) for x in s]
pos = [0, 0]
LR = [s2[i] for i in range(len(s2)) if i % 2 == 0]
UD = [s2[i] for i in range(len(s2)) if i % 2 == 1]
flag = False
tmp = 1
tmp = tmp << sum(LR)
for d in LR:
tmp = tmp << d | tmp >> d
if x >= 0:
tmp = tmp >> su... |
s552356992 | p03488 | u296518383 | 1577132761 | Python | PyPy3 (2.4.0) | py | Runtime Error | 192 | 40816 | 1020 | S = input()
X, Y = map(int, input().split())
T = [0] if S[0] == "T" else []
for i in range(1, len(S)):
if S[i] != S[i-1]:
T.append(i)
T.append(len(S))
#print("T:", T)
U = [T[0]]
for i in range(1, len(T)):
U.append(T[i] - T[i-1])
#print("U:", U)
sum_T = 0
DX, DY = [], []
for i in range(len(U)):
if i % 2:
... |
s910692063 | p03488 | u780962115 | 1576957138 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38384 | 1627 | #FT robot
s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[]
ylist=[]
if s[0]=="T":
for i in range(len(lists)):
if i%2==0:
xlist.append(len(lists[i]))
else:
ylist.append(len(lists[i]))
elif s[0]=="F":
for i in range(len(lists)):
if i%2==0:
... |
s177802317 | p03488 | u780962115 | 1576956658 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2136 | 412936 | 1295 | #FT robot
s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[]
ylist=[]
if s[0]=="T":
for i in range(len(lists)):
if i%2==0:
xlist.append(len(lists[i]))
else:
ylist.append(len(lists[i]))
elif s[0]=="F":
for i in range(len(lists)):
if i%2==0:
... |
s562284412 | p03488 | u780962115 | 1576956202 | Python | PyPy3 (2.4.0) | py | Runtime Error | 459 | 111836 | 1301 | #FT robot
s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[]
ylist=[]
if s[0]=="T":
for i in range(len(lists)):
if i%2==0:
xlist.append(len(lists[i]))
else:
ylist.append(len(lists[i]))
elif s[0]=="F":
for i in range(len(lists)):
if i%2==0:
... |
s625478135 | p03488 | u780962115 | 1576955881 | Python | PyPy3 (2.4.0) | py | Runtime Error | 450 | 111836 | 1302 | #FT robot
s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[0]
ylist=[0]
if s[0]=="T":
for i in range(len(lists)):
if i%2==0:
xlist.append(len(lists[i]))
else:
ylist.append(len(lists[i]))
elif s[0]=="F":
for i in range(len(lists)):
if i%2==0... |
s197120013 | p03488 | u780962115 | 1576955862 | Python | PyPy3 (2.4.0) | py | Runtime Error | 462 | 111836 | 1302 | #FT robot
s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[0]
ylist=[0]
if s[0]=="T":
for i in range(len(lists)):
if i%2==0:
xlist.append(len(lists[i]))
else:
ylist.append(len(lists[i]))
elif s[0]=="F":
for i in range(len(lists)):
if i%2==0... |
s326884422 | p03488 | u780962115 | 1576955728 | Python | PyPy3 (2.4.0) | py | Runtime Error | 487 | 111836 | 1300 | #FT robot
s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[]
ylist=[]
if s[0]=="T":
for i in range(len(lists)):
if i%2==0:
xlist.append(len(lists[i]))
else:
ylist.append(len(lists[i]))
elif s[0]=="F":
for i in range(len(lists)):
if i%2==0:
... |
s068460609 | p03488 | u780962115 | 1576955095 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2140 | 574216 | 1386 | s=input()
gx,gy=map(int,input().split())
lists=list(s.split("T"))
xlist=[]
ylist=[]
if s[0]=="T":
for i in range(len(lists)):
if i%2==0:
xlist.append(len(lists[i]))
else:
ylist.append(len(lists[i]))
elif s[0]=="F":
for i in range(len(lists)):
if i%2==0:
... |
s402410939 | p03488 | u279493135 | 1576549932 | Python | Python (3.4.3) | py | Runtime Error | 1202 | 44392 | 1790 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
de... |
s568490698 | p03488 | u279493135 | 1576549826 | Python | Python (3.4.3) | py | Runtime Error | 1171 | 44396 | 1727 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
de... |
s732439370 | p03488 | u279493135 | 1576549507 | Python | Python (3.4.3) | py | Runtime Error | 1193 | 44400 | 1842 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
de... |
s173403431 | p03488 | u279493135 | 1576549486 | Python | Python (3.4.3) | py | Runtime Error | 1237 | 44404 | 1842 | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
de... |
s280827595 | p03488 | u670180528 | 1576305490 | Python | Python (3.4.3) | py | Runtime Error | 29 | 3188 | 200 | f,*l=map(len,input().split("T"))
x,y=map(int,input().split())
z=8000;bx=1<<f+z;by=1<<z
for dy,dx in zip(*[iter(l)]*2):bx=bx<<dx|bx>>dx;by=by<<dy|by>>dy
print("Yes"*(bx&(1<<x+z) and by&(1<<y+z))or"No") |
s422658305 | p03488 | u905582793 | 1576209335 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 1288 | import sys
s = input()
gx,gy = map(int, input().split(' '))
x_d = [0]
y_d = []
cnt = 0
for i in range(len(s)):
if s[i] == "T":
cnt += 1
if cnt % 2 == 0:
x_d.append(0)
elif cnt % 2 == 1:
y_d.append(0)
if s[i] == "F":
if cnt % 2 == 0:
x_d[-1] += ... |
s340436570 | p03488 | u905582793 | 1576206685 | Python | PyPy3 (2.4.0) | py | Runtime Error | 451 | 111324 | 1164 | import sys
s = input()
gx,gy = map(int, input().split(' '))
x_d = [0]
y_d = []
cnt = 0
for i in range(len(s)):
if s[i] == "T":
cnt += 1
if cnt % 2 == 0:
x_d.append(0)
elif cnt % 2 == 1:
y_d.append(0)
if s[i] == "F":
if cnt % 2 == 0:
x_d[-1] += ... |
s820652109 | p03488 | u905582793 | 1576205948 | Python | PyPy3 (2.4.0) | py | Runtime Error | 439 | 111324 | 1165 | import sys
s = input()
gx,gy = map(int, input().split(' '))
x_d = [0]
y_d = []
cnt = 0
for i in range(len(s)):
if s[i] == "T":
cnt += 1
if cnt % 2 == 0:
x_d.append(0)
elif cnt % 2 == 1:
y_d.append(0)
if s[i] == "F":
if cnt % 2 == 0:
x_d[-1] += ... |
s824293368 | p03488 | u905582793 | 1576205845 | Python | PyPy3 (2.4.0) | py | Runtime Error | 439 | 111324 | 1161 | import sys
s = input()
gx,gy = map(int, input().split(' '))
x_d = [0]
y_d = []
cnt = 0
for i in range(len(s)):
if s[i] == "T":
cnt += 1
if cnt % 2 == 0:
x_d.append(0)
elif cnt % 2 == 1:
y_d.append(0)
if s[i] == "F":
if cnt % 2 == 0:
x_d[-1] += ... |
s205069150 | p03488 | u905582793 | 1576205805 | Python | PyPy3 (2.4.0) | py | Runtime Error | 448 | 111196 | 1145 | import sys
s = input()
gx,gy = map(int, input().split(' '))
x_d = [0]
y_d = []
cnt = 0
for i in range(len(s)):
if s[i] == "T":
cnt += 1
if cnt % 2 == 0:
x_d.append(0)
elif cnt % 2 == 1:
y_d.append(0)
if s[i] == "F":
if cnt % 2 == 0:
x_d[-1] += ... |
s182992665 | p03488 | u905582793 | 1576205707 | Python | PyPy3 (2.4.0) | py | Runtime Error | 448 | 111324 | 1145 | import sys
s = input()
gx,gy = map(int, input().split(' '))
x_d = [0]
y_d = []
cnt = 0
for i in range(len(s)):
if s[i] == "T":
cnt += 1
if cnt % 2 == 0:
x_d.append(0)
elif cnt % 2 == 1:
y_d.append(0)
if s[i] == "F":
if cnt % 2 == 0:
x_d[-1] += ... |
s957865503 | p03488 | u905582793 | 1576205575 | Python | PyPy3 (2.4.0) | py | Runtime Error | 454 | 113244 | 1161 | import sys
s = input()
gx,gy = map(int, input().split(' '))
x_d = [0]
y_d = []
cnt = 0
for i in range(len(s)):
if s[i] == "T":
cnt += 1
if cnt % 2 == 0:
x_d.append(0)
elif cnt % 2 == 1:
y_d.append(0)
if s[i] == "F":
if cnt % 2 == 0:
x_d[-1] += ... |
s515646950 | p03488 | u905582793 | 1576205522 | Python | Python (3.4.3) | py | Runtime Error | 2109 | 69748 | 1161 | import sys
s = input()
gx,gy = map(int, input().split(' '))
x_d = [0]
y_d = []
cnt = 0
for i in range(len(s)):
if s[i] == "T":
cnt += 1
if cnt % 2 == 0:
x_d.append(0)
elif cnt % 2 == 1:
y_d.append(0)
if s[i] == "F":
if cnt % 2 == 0:
x_d[-1] += ... |
s274010205 | p03488 | u020390084 | 1575235353 | Python | Python (3.4.3) | py | Runtime Error | 2134 | 495604 | 1912 | #!/usr/bin/env python3
import sys
YES = "Yes" # type: str
NO = "No" # type: str
def solve(s: str, x: int, y: int):
LENS = len(s)
s_list = list(map(len,s.split("T")))
x_s_list = s_list[0::2]
y_s_list = s_list[1::2]
x_dp = [[False]*(2*LENS+1) for _ in range(len(x_s_list))]
## answer = x_dp[-1... |
s178009537 | p03488 | u047816928 | 1574997367 | Python | Python (3.4.3) | py | Runtime Error | 1530 | 3188 | 472 | s = input()
x, y = list(map(int, input().split()))
F = [len(fs) for fs in s.split('T')]
Fx = F[0::2]
Fy = F[1::2]
xt2 = sum(Fx)-x
yt2 = sum(Fy)-y
if xt2%2==1 or yt2%2==1:
print('No')
exit()
xt = xt2//2
yt = yt2//2
dpx = [False]*(xt+1)
dpx[0] = True
for f in Fx:
for i in range(xt, f-1, -1): dpx[i] |= dpx[... |
s074477363 | p03488 | u047816928 | 1574996580 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3316 | 505 | s = input()
x, y = list(map(int, input().split()))
F = [len(fs) for fs in s.split('T')]
Fx = F[0::2]
Fy = F[1::2]
xt2 = (sum(Fx)-x)
yt2 = (sum(Fy)-y)
if xt2%2==1 or yt2%2==1:
print('No')
exit()
xt = xt2//2
yt = yt2//2
M = 8000
dpx = [False]*M
dpx[0] = True
for f in Fx:
for i in range(M-1, f-1, -1):
... |
s274741285 | p03488 | u263830634 | 1573876623 | Python | Python (3.4.3) | py | Runtime Error | 152 | 12512 | 999 | import numpy as np
s = list(input())
x, y = map(int, input().split())
X = [0]
Y = [0]
flag = True
tmp = 0
for i in s:
if i == 'F':
tmp += 1
else:
if flag:
X.append(tmp)
else:
Y.append(tmp)
tmp = 0
flag = not flag
if flag:
X.append(tmp)
else:... |
s764600632 | p03488 | u263830634 | 1573876599 | Python | Python (3.4.3) | py | Runtime Error | 153 | 12512 | 995 | import numpy as np
s = list(input())
x, y = map(int, input().split())
X = [0]
Y = [0]
flag = True
tmp = 0
for i in s:
if i == 'F':
tmp += 1
else:
if flag:
X.append(tmp)
else:
Y.append(tmp)
tmp = 0
flag = not flag
if flag:
X.append(tmp)
else:... |
s855648104 | p03488 | u263830634 | 1573876512 | Python | Python (3.4.3) | py | Runtime Error | 150 | 12600 | 993 | import numpy as np
s = list(input())
x, y = map(int, input().split())
X = [0]
Y = [0]
flag = True
tmp = 0
for i in s:
if i == 'F':
tmp += 1
else:
if flag:
X.append(tmp)
else:
Y.append(tmp)
tmp = 0
flag = not flag
if flag:
X.append(tmp)
else:... |
s234001461 | p03488 | u263830634 | 1573876035 | Python | Python (3.4.3) | py | Runtime Error | 1052 | 14516 | 1002 | import numpy as np
s = list(input())
x, y = map(int, input().split())
X = [0]
Y = [0]
flag = True
tmp = 0
for i in s:
if i == 'F':
tmp += 1
else:
if flag:
X.append(tmp)
else:
Y.append(tmp)
tmp = 0
flag = not flag
if flag:
X.append(tmp)
else:... |
s695360713 | p03488 | u263830634 | 1573875066 | Python | Python (3.4.3) | py | Runtime Error | 1240 | 3188 | 891 | s = list(input())
x, y = map(int, input().split())
x = abs(x)
y = abs(y)
X = [0]
Y = [0]
flag = True
tmp = 0
for i in s:
if i == 'F':
tmp += 1
else:
if flag:
X.append(tmp)
else:
Y.append(tmp)
tmp = 0
flag = not flag
if flag:
X.append(tmp)
e... |
s473090612 | p03488 | u380772254 | 1573863473 | Python | PyPy3 (2.4.0) | py | Runtime Error | 838 | 389900 | 820 | from collections import defaultdict
s = input()
x, y = map(int, input().split())
arr = list(map(len, s.split('T')))
EW = [arr[ew] for ew in range(0, len(arr), 2)]
NS = [arr[ns] for ns in range(1, len(arr), 2)]
# dp[i][j] := i回目までの移動で座標jにいることができるか
dp = [defaultdict(bool) for i in range(len(EW))]
dp[0][EW[0]] = True
f... |
s909863357 | p03488 | u638795007 | 1572716200 | Python | PyPy3 (2.4.0) | py | Runtime Error | 289 | 101980 | 1491 | from collections import deque
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')
S = str(input())
X, Y = LI()
N = len(S)
ans = "No"
Fx = deque()
Fy = deque()
ve = int(1)
cur = int(0)
for i in range(N):
if S[i]=="F":
... |
s986560379 | p03488 | u508486691 | 1572662140 | Python | PyPy3 (2.4.0) | py | Runtime Error | 551 | 49500 | 1754 | import sys
import math
from collections import defaultdict
sys.setrecursionlimit(10**7)
def input():
return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
if N<=0:
ret... |
s493261748 | p03488 | u508486691 | 1572661618 | Python | PyPy3 (2.4.0) | py | Runtime Error | 561 | 55516 | 1758 | import sys
import math
from collections import defaultdict
sys.setrecursionlimit(10**7)
def input():
return sys.stdin.readline()[:-1]
mod = 10**9 + 7
def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
if N<=0:
ret... |
s584378197 | p03488 | u672220554 | 1572647230 | Python | PyPy3 (2.4.0) | py | Runtime Error | 814 | 173704 | 1220 | def main():
s=input()
x,y=map(int,input().split())
lf = [0]
tf = 0
for i in range(len(s)):
if s[i] =="F":
lf[tf] += 1
else:
lf.append(0)
tf += 1
lx = [lf[i] for i in range(len(lf)) if i % 2 == 0]
ly = [lf[i] for i in range(len(lf)) if i %... |
s432008278 | p03488 | u672220554 | 1572645712 | Python | PyPy3 (2.4.0) | py | Runtime Error | 831 | 173576 | 1216 | def main():
s=input()
x,y=map(int,input().split())
lf = [0]
tf = 0
for i in range(len(s)):
if s[i] =="F":
lf[tf] += 1
else:
lf.append(0)
tf += 1
lx = [lf[i] for i in range(len(lf)) if i % 2 == 0]
ly = [lf[i] for i in range(len(lf)) if i %... |
s771612432 | p03488 | u672220554 | 1572645480 | Python | PyPy3 (2.4.0) | py | Runtime Error | 855 | 175496 | 1243 | def main():
s=input()
x,y=map(int,input().split())
lf = [0]
tf = 0
for i in range(len(s)):
if s[i] =="F":
lf[tf] += 1
else:
lf.append(0)
tf += 1
lx = [lf[i] for i in range(len(lf)) if i % 2 == 0]
ly = [lf[i] for i in range(len(lf)) if i %... |
s700022570 | p03488 | u520276780 | 1571869102 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2184 | 1176584 | 1538 | #例外処理がお手上げ
s = input()
ls = len(s)
x,y = map(int, input().split( ))
cnt_fx = 0
FX = []
cnt_fy = 0
FY = []
direct_x = 1
for i in range(len(s)):
if s[i]=="F":
if direct_x:
cnt_fx += 1
else:
cnt_fy += 1
else:
if direct_x:
FX.append(cnt_fx)
cn... |
s247635270 | p03488 | u123756661 | 1571724708 | Python | PyPy3 (2.4.0) | py | Runtime Error | 184 | 40688 | 689 | s=input()
x,y=map(int,input().split())
xx,yy=[],[]
w=[0,0]
ans=chk=0
f=0
for i in s:
if f==0 and i=='F':
w[0]+=1
elif f==0 and i=='T':
f=1
elif f==1 and i=='F':
chk+=1
elif f==1 and i=='T':
yy.append(chk)
chk=0
f=2
elif f==2 and i=='F':
chk+=1
... |
s612542124 | p03488 | u155687575 | 1571029160 | Python | Python (3.4.3) | py | Runtime Error | 85 | 4088 | 1730 | # D
s = input()
x, y = map(int, input().split())
finished = []
def dfs(now, index, direction):
if index == len(s)-1:
if s[index] == 'T':
finished.append(now)
return
elif s[index] == 'F':
if direction==1:
nowx, nowy = now
next = (no... |
s280831032 | p03488 | u155687575 | 1571029106 | Python | Python (3.4.3) | py | Runtime Error | 86 | 4124 | 1743 | s = input()
x, y = map(int, input().split())
finished = []
def dfs(now, index, direction):
if index == len(s)-1:
if s[index] == 'T':
finished.append(now)
return
elif s[index] == 'F':
if direction==1:
nowx, nowy = now
next = (nowx+1... |
s269633974 | p03488 | u155687575 | 1571028754 | Python | PyPy3 (2.4.0) | py | Runtime Error | 296 | 44432 | 1730 | # D
s = input()
x, y = map(int, input().split())
finished = []
def dfs(now, index, direction):
if index == len(s)-1:
if s[index] == 'T':
finished.append(now)
return
elif s[index] == 'F':
if direction==1:
nowx, nowy = now
next = (no... |
s761938825 | p03488 | u190616335 | 1570938149 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3192 | 1609 | # -*- coding: utf-8 -*-
def check(z, zz, z_list):
if len(z_list) == 0:
if z != zz:
return 0
else:
return 1
else:
z_n = len(z_list)
z_hash = {}
z_hash[0] = {}
z_hash[0][zz] = 1
z_hash[z_n] = {}
z_hash[z_n][z] = 1
for i in range(0,z_n):
if i+1 not in z_hash:
... |
s566365178 | p03488 | u190616335 | 1570923497 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 20980 | 1026 | # -*- coding: utf-8 -*-
def check(z, zz, z_list, dire):
zz += z_list[0] * dire
if len(z_list) == 1:
if z == zz:
return 1
else:
return 0
else:
if check(z, zz, z_list[1:], 1) == 0:
if check(z, zz, z_list[1:], -1) == 0:
return 0
return 1
def func(x, y, xx, yy, x_list, y... |
s464527257 | p03488 | u190616335 | 1570923307 | Python | Python (3.4.3) | py | Runtime Error | 123 | 20988 | 1062 | # -*- coding: utf-8 -*-
def check(z, zz, z_list, dire):
zz += z_list[0] * dire
if len(z_list) == 1:
if z == zz:
return 1
else:
return 0
else:
if check(z, zz, z_list[1:], 1) == 0:
return 0
if check(z, zz, z_list[1:], -1) == 0:
return 0
return 1
def func(x, y, xx, y... |
s757239805 | p03488 | u190616335 | 1570921675 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 20984 | 1017 | # -*- coding: utf-8 -*-
def check(z, zz, z_list, dire):
zz += z_list[0] * dire
if len(z_list) == 1:
if z == zz:
return 1
else:
return 0
else:
if check(z, zz, z_list[1:], 1) == 0 and check(z, zz, z_list[1:], -1) == 0:
return 0
else:
return 1
def func(x, y, xx, yy, x_li... |
s035758143 | p03488 | u190616335 | 1570921470 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 20976 | 1016 | # -*- coding: utf-8 -*-
def check(z, zz, z_list, dire):
zz += z_list[0] * dire
if len(z_list) == 1:
if z == zz:
return 1
else:
return 0
else:
if check(z, zz, z_list[1:], 1) == 0 and check(z, zz, z_list[1:], 1) == 0:
return 0
else:
return 1
def func(x, y, xx, yy, x_lis... |
s406477671 | p03488 | u190616335 | 1570852681 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 11372 | 800 | # -*- coding: utf-8 -*-
def check(s, x, y, xx, yy, dire):
if len(s) > 0:
i = 0
for command in s:
i += 1
if command == "F":
xx += dire[0]
yy += dire[1]
else:
if dire[0] != 0:
if check(s[i:], x, y, xx, yy, [0, 1]) == 1:
return 1
if check(... |
s196720198 | p03488 | u190616335 | 1570849602 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 11372 | 811 | # -*- coding: utf-8 -*-
def check(s, x, y, xx, yy, dire):
if len(s) > 0:
i = 0
for command in s:
i += 1
if command == "F":
xx += dire[0]
yy += dire[1]
else:
if dire[0] != 0:
if check(s[i:], x, y, xx, yy, [0, 1]) == 1:
return 1
if check(... |
s232297681 | p03488 | u190616335 | 1570848429 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 11368 | 811 | # -*- coding: utf-8 -*-
def check(s, x, y, xx, yy, dire):
if len(s) != 0:
i = 0
for command in s:
i += 1
if command == "F":
xx += dire[0]
yy += dire[1]
else:
if dire[0] != 0:
if check(s[i:], x, y, xx, yy, [0, 1]) == 1:
return 1
if check(... |
s572449149 | p03488 | u466331465 | 1570674462 | Python | PyPy3 (2.4.0) | py | Runtime Error | 525 | 285832 | 1921 | import sys
import itertools
from itertools import accumulate
def main():
import itertools
def eratosthenes_sieve(n):
table = [0] * (n + 1)
prime_list = []
for i in range(2, n + 1):
if table[i] == 0:
prime_list.append(i)
for j in range(i + i, n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.