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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s817000937 | p03487 | u353919145 | 1517791190 | Python | Python (3.4.3) | py | Runtime Error | 27 | 5548 | 300 | from collections import Counter
a = int(input())
l = []
for i in range(0,a):
b = int(input())
l.append(b)
c=Counter(l)
d = dict(c)
#print(d)
kv = []
for k,v in d.items():
if k>v:
t = v
kv.append(t)
elif k<v:
t = v-k
kv.append(t)
s = sum(kv)
print(s)
|
s268395806 | p03487 | u816631826 | 1517791056 | Python | Python (3.4.3) | py | Runtime Error | 27 | 5548 | 299 | from collections import Counter
a = int(input())
l = []
for i in range(0,a):
b = int(input())
l.append(b)
c=Counter(l)
d = dict(c)
print(d)
kv = []
for k,v in d.items():
if k>v:
t = v
kv.append(t)
elif k<v:
t = v-k
kv.append(t)
s = sum(kv)
print(s)
|
s612455108 | p03487 | u353919145 | 1517790908 | Python | Python (3.4.3) | py | Runtime Error | 27 | 5548 | 299 | from collections import Counter
a = int(input())
l = []
for i in range(0,a):
b = int(input())
l.append(b)
c=Counter(l)
d = dict(c)
print(d)
kv = []
for k,v in d.items():
if k>v:
t = v
kv.append(t)
elif k<v:
t = v-k
kv.append(t)
s = sum(kv)
print(s)
|
s366883387 | p03487 | u089230684 | 1517790008 | Python | Python (3.4.3) | py | Runtime Error | 27 | 5548 | 345 | from collections import Counter
a = int(input())
l = []
for i in range(0,a):
b = int(input())
l.append(b)
c=Counter(l)
d = dict(c)
kv = []
for k,v in d.items():
if k>v:
t = v
kv.append(t)
elif k<v:
t = v-k
kv.append(t)
elif k==v:
t= 0
kv.append(t) ... |
s176021302 | p03487 | u353919145 | 1517789986 | Python | Python (3.4.3) | py | Runtime Error | 28 | 5548 | 345 | from collections import Counter
a = int(input())
l = []
for i in range(0,a):
b = int(input())
l.append(b)
c=Counter(l)
d = dict(c)
kv = []
for k,v in d.items():
if k>v:
t = v
kv.append(t)
elif k<v:
t = v-k
kv.append(t)
elif k==v:
t= 0
kv.append(t) ... |
s061717840 | p03487 | u484460274 | 1514840905 | Python | Python (3.4.3) | py | Runtime Error | 120 | 21224 | 302 | from collections import Counter
N=int(input())
a=list(map(int,input().split()))
answer=0
count_sum=0
counter = Counter(a)
for num, cnt in counter.most_common():
# print (num, cnt)
count_sum+=cnt
if cnt>num:
answer += cnt-i
elif cnt<num:
answer += cnt
answer+=N-count_sum
print(answer)
|
s135767779 | p03487 | u401093859 | 1514762860 | Python | Python (3.4.3) | py | Runtime Error | 90 | 15260 | 343 | N = int(input())
series = list(map(int, input().split()))
place = [0 for _ in range(100000)]
counter = 0
max = 0
for i in series:
place[i] += 1
if i > max:
max = i
for j in range(len(place)):
if place[j] > j:
counter += place[j] - j
elif j > place[j]:
counter += place[j]
... |
s933233021 | p03487 | u558836062 | 1514258505 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 15260 | 373 | N = int(input())
lis = list(map(int,input().split()))
lis.sort()
Ans = 0
p = 0
while(True):
if p >= N:
break
if lis[p] > lis.count(lis[p]):
Ans += lis.count(lis[p])
p += lis.count(lis[p])
if lis[p] == lis.count(lis[p]):
p += lis.count(lis[p])
if lis[p] < lis.count(lis[p]):
Ans += lis.count(li... |
s623340870 | p03487 | u554720358 | 1513809327 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 14024 | 1738 | #!/usr/bin/env python
N=int(input())
a=[int(i) for i in input().split()]
a.sort()
numbers=[int(i) for i in set(a)]
numbers.sort()
# print("a", a)
# print("numbers", numbers)
def main():
label=0 # numbersの添字
i=0 # aの添字
err=0 # 削除する要素の数
while(True):
# 範囲を超えるパターン
if(len(numbers) <= lab... |
s419740922 | p03487 | u225528554 | 1513714783 | Python | Python (3.4.3) | py | Runtime Error | 77 | 18164 | 348 | def main():
N = int(input())
l = list(map(int,input().split(" ")))
dic = {}
count = 0
for i in l:
try:
dic[i] += 1
except Exception:
dic[i] = 1
for j in range(1, len(dic)):
count += (dic[j] - j) if dic[j] > j else dic[j]
print(count)
if __na... |
s515164424 | p03487 | u274907892 | 1513483026 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 14268 | 237 | N = input()
list = [int(a) for a in input().split()]
count = 0
for i in range(len(list)):
if list[i] != list.count(list[i]):
list.remove(list[i])
count += 1
if i == len(list)-1:
break
print(count)
|
s911135227 | p03487 | u833492079 | 1513482520 | Python | Python (3.4.3) | py | Runtime Error | 57 | 14796 | 507 | N = int(input()) # 5
b = list( map(int, input().split()) )
a = []
#print("N", N)
#print("b", b)
big = 0
#でかいのを除外する
for i in b:
if i <= 10000:
a.append(i)
else:
big += 1
if len(a) == 0:
print(big)
exit(0)
l=[0]*( max(a) +1)
for i in b:
l[i] += 1
#print("l", l)
ans=big
for i in range( len(l) ):
if... |
s034647570 | p03487 | u274907892 | 1513482491 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 12876 | 325 | N = input()
list = [a for a in input().split()]
count = 0
A = len(list)
for i in range(A):
# print(list[i])
# print(list.count(list[i]))
if list[i] != list.count(list[i]):
list.remove(list[i])
count += 1
if i == len(list)-1:
break
# print(list)
# print(count)
print(count)
... |
s234926845 | p03487 | u274907892 | 1513482418 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 11872 | 319 | N = input()
list = [a for a in input().split()]
count = 0
for i in range(len(list)):
# print(list[i])
# print(list.count(list[i]))
if list[i] != list.count(list[i]):
list.remove(list[i])
count += 1
if i == len(list)-1:
break
# print(list)
# print(count)
print(count)
|
s535191006 | p03487 | u429443682 | 1513481621 | Python | Python (3.4.3) | py | Runtime Error | 89 | 15260 | 305 | N = int(input())
l = list(map(int, input().split()))
li = [0] * (max(l) + 1)
count = 0
for i in range(len(l)):
h = l[i]
li[h] += 1
for j in range(len(li)):
if li[j] == j:
continue
elif li[j] < j:
count += li[j]
elif li[j] > j:
count += (li[j] - j)
print(count)
|
s496987842 | p03487 | u429443682 | 1513481468 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 302 | N = int(input())
l = list(map(int, input().split()))
li = [0] * (max(l) + 1)
count = 0
for i in range(len(l)):
h = l[i]
li[h] += 1
for j in range(len(li)):
if li[j] == j
continue
elif li[j] < j:
count += li[j]
elif li[j] > j:
count += (li[j] - j)
print(count)
|
s764516869 | p03487 | u432042540 | 1513481466 | Python | Python (3.4.3) | py | Runtime Error | 1242 | 23304 | 566 | import numpy as np
n = int(input())
a = [int(i) for i in input().split()]
total = 0
for i in range(n):
if a[i] > 10**5:
total = n - i
a = a[0:i]
break
a = np.array(a)
u, c = np.unique(a, return_counts=True)
# print(u, c)
end = (10**5) + 1
i = 1
for (i, cnt) in zip(u, c):
num = 0
... |
s959192760 | p03487 | u586577600 | 1513481291 | Python | Python (3.4.3) | py | Runtime Error | 318 | 23272 | 257 | import numpy as np
n = int(input())
a_l = list(map(int, input().split()))
a_l = np.sort(a_l)
r = 0
while 0 != len(a_l):
c = a_l.count(a_l[0])
if c > a_l[0]:
r += c - a_l[0]
elif c != a_l[0]:
r += c
a_l = a_l[c:]
print(r)
|
s045050831 | p03487 | u429443682 | 1513481047 | Python | Python (3.4.3) | py | Runtime Error | 82 | 14268 | 307 | N = int(input())
l = list(map(int, input().split()))
li = [0] * (max(l) + 2)
count = 0
for i in range(len(l)):
j = l[i]
li[j] += 1
for j in range(len(li)):
if li[j] < j:
count += li[j]
elif li[j] > j:
count += (li[j] - j)
elif li[j] == j:
count += 0
print(count)
|
s725824980 | p03487 | u429443682 | 1513480913 | Python | Python (3.4.3) | py | Runtime Error | 80 | 15260 | 294 | N = int(input())
l = list(map(int, input().split()))
li = [0] * (max(l) + 2)
count = 0
for i in range(len(l)):
j = l[i]
li[j] += 1
for j in range(len(li)):
if li[j] < j:
count += li[j]
elif li[j] > j:
count += (li[j] - j)
else:
continue
print(count)
|
s482046977 | p03487 | u429443682 | 1513480674 | Python | Python (3.4.3) | py | Runtime Error | 79 | 15260 | 294 | N = int(input())
l = list(map(int, input().split()))
li = [0] * (max(l) + 1)
count = 0
for i in range(len(l)):
j = l[i]
li[j] += 1
for j in range(len(li)):
if li[j] < j:
count += li[j]
elif li[j] > j:
count += (li[j] - j)
else:
continue
print(count)
|
s237360669 | p03487 | u429443682 | 1513480431 | Python | Python (3.4.3) | py | Runtime Error | 67 | 14364 | 332 | N = int(input())
l = list(map(int, input().split()))
li = [0] * (max(l) + 1)
count = 0
for i in range(len(l)):
j = l[i]
li[j] += 1
for j in range(len(li)):
if li[j] == 0:
continue
elif li[j] < j:
count += li[j]
elif li[j] > j:
count += (li[j] - j)
else:
continue
p... |
s814999305 | p03487 | u695429668 | 1513479732 | Python | Python (3.4.3) | py | Runtime Error | 43 | 15260 | 390 | # coding:utf-8
N = int(input())
a = input().split()
a_ = list(map(int, a))
#back_a = list(map(lambda x:x*0, list(range(N))))
back_i = 0
back_i2 = 0
for i in range(N):
a_count = a[i-back_i]
if a_count > int(a[i-back_i]):
del a[i-back_i]
back_i += 1
#back_i2 +=
if a_count < int(a[i-... |
s906060429 | p03487 | u335295553 | 1513479189 | Python | Python (3.4.3) | py | Runtime Error | 52 | 14692 | 190 | input()
ls = list(map(int,input().split()))
for i in set(ls):
while True:
if ls.count(i) == 0 or ls.count(i) == i:
break
ls.remove(i)
n += 1
print(n)
|
s029375421 | p03487 | u335295553 | 1513478874 | Python | Python (3.4.3) | py | Runtime Error | 51 | 14692 | 181 | input()
ls = list(map(int,input().split()))
for i in set(ls):
while True:
if ls.count(i) == 0 or ls.count(i) == i:
break
ls.remove(i)
n += 1
|
s044209073 | p03487 | u274907892 | 1513478649 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 12668 | 230 | N = input()
list = [a for a in input().split()]
count = 0
for i in range(len(list)):
if not list[i] == list.count(i):
list.remove(list[i])
count += 1
if i == len(list)-1:
break
print(count)
|
s126959035 | p03487 | u158225062 | 1513478185 | Python | Python (3.4.3) | py | Runtime Error | 28 | 11192 | 99 |
N = input()
M = input().split()
count1=M.count(N)
if len(M)==1:
print(1)
else:
print(count1-N) |
s109244667 | p03487 | u115009723 | 1513476703 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 226 | cnt={}
for e in a:
if e in cnt:
cnt[e]+=1
else:
cnt[e]=1
ans=0
for e in a:
if cnt[e]==0:
continue
else:
if cnt[e] > e:
ans+=cnt[e]-e
elif cnt[e] < e:
ans+=cnt[e]
cnt[e]=0
print(ans)
|
s011878012 | p03488 | u342869120 | 1600837517 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1442 | 466960 | 922 |
def YesNo(b):
print("Yes" if b else "No")
def solve(v, l, ini):
ml = 8000*2+1
dp = [[False]*ml for i in range(len(l)+1)]
for i in range(len(ini)):
dp[0][ini[i]+8000] = True
for i in range(1, len(l)+1):
for j in range(ml):
if (j+l[i-1]) < ml and dp[i-1][j]:
... |
s872324697 | p03488 | u342869120 | 1600836532 | Python | PyPy3 (7.3.0) | py | Runtime Error | 512 | 200176 | 929 |
def YesNo(b):
print("Yes" if b else "No")
def solve(n, v, l, ini):
ml = n*2+1
dp = [[False]*ml for i in range(len(l)+1)]
for i in range(len(ini)):
dp[0][ini[i]+n] = True
for i in range(1, len(l)+1):
for j in range(ml):
if (j+l[i-1]) < ml and dp[i-1][j]:
... |
s059157877 | p03488 | u239528020 | 1600814157 | Python | PyPy3 (7.3.0) | py | Runtime Error | 760 | 201604 | 1695 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
s = str(input())
obj_x, obj_y = list(map(int, input().split()))
x = []
y = []
flag = 0
num = 0
for i in range(len(s)):
if s[i] == "T":
if flag % 2 == 0:
x.append(num)
else:
y.append(num)
flag += 1
... |
s487208021 | p03488 | u239528020 | 1600813440 | Python | Python (3.8.2) | py | Runtime Error | 2209 | 134856 | 1685 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
s = str(input())
obj_x, obj_y = list(map(int, input().split()))
x = []
y = []
flag = 0
num = 0
num_x = 0
num_y = 0
for i in range(len(s)):
if s[i] == "T":
if flag % 2 == 0:
x.append(num)
num_x += abs(num)
else:... |
s325903925 | p03488 | u239528020 | 1600813150 | Python | PyPy3 (7.3.0) | py | Runtime Error | 783 | 202168 | 1505 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
s = str(input())
obj_x, obj_y = list(map(int, input().split()))
x = []
y = []
flag = 0
num = 0
for i in range(len(s)):
if s[i] == "T":
if flag % 2 == 0:
x.append(num)
else:
y.append(num)
flag += 1
... |
s240863679 | p03488 | u239528020 | 1600813141 | Python | Python (3.8.2) | py | Runtime Error | 2209 | 135084 | 1505 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**6)
s = str(input())
obj_x, obj_y = list(map(int, input().split()))
x = []
y = []
flag = 0
num = 0
for i in range(len(s)):
if s[i] == "T":
if flag % 2 == 0:
x.append(num)
else:
y.append(num)
flag += 1
... |
s398420484 | p03488 | u644907318 | 1600658277 | Python | PyPy3 (7.3.0) | py | Runtime Error | 489 | 210392 | 1590 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
if cnt>0:
AX.append(cnt)
cnt = 0
flag = 1
else:
if cnt>0:
... |
s475642549 | p03488 | u644907318 | 1600658097 | Python | PyPy3 (7.3.0) | py | Runtime Error | 509 | 205448 | 1589 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
if cnt>0:
AX.append(cnt)
cnt = 0
flag = 1
else:
if cnt>0:
... |
s961717681 | p03488 | u644907318 | 1600657908 | Python | PyPy3 (7.3.0) | py | Runtime Error | 497 | 211740 | 1529 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
flag =... |
s856225724 | p03488 | u644907318 | 1600657244 | Python | PyPy3 (7.3.0) | py | Runtime Error | 561 | 205432 | 1595 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
flag =... |
s963360334 | p03488 | u644907318 | 1600657100 | Python | PyPy3 (7.3.0) | py | Runtime Error | 529 | 211908 | 1538 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
flag =... |
s865280876 | p03488 | u644907318 | 1600656878 | Python | PyPy3 (7.3.0) | py | Runtime Error | 523 | 212088 | 1483 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
flag =... |
s343366388 | p03488 | u644907318 | 1600656737 | Python | PyPy3 (7.3.0) | py | Runtime Error | 505 | 211796 | 1482 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
flag =... |
s368915062 | p03488 | u644907318 | 1600655966 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2231 | 1071404 | 1452 | s = input().strip()
N = len(s)
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
... |
s605618344 | p03488 | u644907318 | 1600655868 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1624 | 587576 | 1392 | s = input().strip()
N = len(s)
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
... |
s649717701 | p03488 | u644907318 | 1600655462 | Python | PyPy3 (7.3.0) | py | Runtime Error | 480 | 331544 | 1456 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
flag =... |
s534975602 | p03488 | u644907318 | 1600654398 | Python | Python (3.8.2) | py | Runtime Error | 2213 | 264976 | 1757 | s = input().strip()
x,y = map(int,input().split())
AX = []
AY = []
flag = 0
cnt = 0
for i in range(len(s)):
if s[i]=="F":
cnt += 1
else:
if flag==0:
AX.append(cnt)
cnt = 0
flag = 1
else:
AY.append(cnt)
cnt = 0
flag =... |
s624404271 | p03488 | u197457087 | 1600652688 | Python | PyPy3 (7.3.0) | py | Runtime Error | 422 | 88764 | 1427 | s = str(input()); n = len(s)
gx,gy = map(int,input().split())
Yoko = []; Tate = []
Flag = 0; cnt = 0
Max_x = 0; Max_y = 0
for i in range(n):
if s[i] == "F":
cnt += 1
if i == n-1: #最後なら登録
if Flag == 0:
Max_x += cnt
Yoko.append(cnt)
else:
Max_y += cnt
Tate.append(cnt)... |
s989218547 | p03488 | u454093752 | 1600440867 | Python | PyPy3 (7.3.0) | py | Runtime Error | 372 | 200412 | 1538 | import sys
S = list(input())
x, y = map(int, input().split())
c = 0
p = 0
q = 0
now = 0
R = []
L = []
for i in range(len(S)):
if S[i] == "T":
if p != 0:
R.append(p)
p = 0
elif q != 0:
L.append(q)
q = 0
c += 1
elif c == 0:
now += 1
... |
s004309081 | p03488 | u454093752 | 1600440524 | Python | PyPy3 (7.3.0) | py | Runtime Error | 376 | 201708 | 1381 | S = list(input())
x, y = map(int, input().split())
c = 0
p = 0
q = 0
now = 0
R = []
L = []
for i in range(len(S)):
if S[i] == "T":
if p != 0:
R.append(p)
p = 0
elif q != 0:
L.append(q)
q = 0
c += 1
elif c == 0:
now += 1
elif c %... |
s423499080 | p03488 | u454093752 | 1600440149 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2216 | 388148 | 1433 | S = list(input())
x, y = map(int, input().split())
c = 0
p = 0
q = 0
now = 0
R = []
L = []
for i in range(len(S)):
if S[i] == "T":
if p != 0:
R.append(p)
p = 0
elif q != 0:
L.append(q)
q = 0
c += 1
elif c == 0:
now += 1
elif c %... |
s369952534 | p03488 | u692453235 | 1600325561 | Python | Python (3.8.2) | py | Runtime Error | 110 | 27308 | 1185 | import numpy as np
MOD = 10**9 + 7
def fft_convolve(f, g):
Lf, Lg = f.shape[-1], g.shape[-1]
L = Lf + Lg - 1
fft_len = 1 << L.bit_length()
fh, fl = f >> 15, f & (1 << 15) - 1
gh, gl = g >> 15, g & (1 << 15) - 1
def conv(f, g):
Ff = np.fft.rfft(f, fft_len)
Fg = np.fft.rfft(g, fft_len)
h = np.fft... |
s391778783 | p03488 | u692453235 | 1600321211 | Python | Python (3.8.2) | py | Runtime Error | 174 | 27664 | 1130 | import numpy as np
MOD = 10**9 + 7
def fft_convolve(f, g):
Lf, Lg = f.shape[-1], g.shape[-1]
L = Lf + Lg - 1
fft_len = 1 << L.bit_length()
fh, fl = f >> 15, f & (1 << 15) - 1
gh, gl = g >> 15, g & (1 << 15) - 1
def conv(f, g):
Ff = np.fft.rfft(f, fft_len)
Fg = np.fft.rfft(g, fft_len)
h = np.fft... |
s331552570 | p03488 | u692453235 | 1600320716 | Python | Python (3.8.2) | py | Runtime Error | 164 | 27592 | 1133 | import numpy as np
MOD = 10**9 + 7
def fft_convolve(f, g):
Lf, Lg = f.shape[-1], g.shape[-1]
L = Lf + Lg - 1
fft_len = 1 << L.bit_length()
fh, fl = f >> 15, f & (1 << 15) - 1
gh, gl = g >> 15, g & (1 << 15) - 1
def conv(f, g):
Ff = np.fft.rfft(f, fft_len)
Fg = np.fft.rfft(g, fft_len)
h = np.fft... |
s632143801 | p03488 | u454760747 | 1599900623 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 63844 | 1050 | from copy import deepcopy
s = list(input())
a, b = map(int, input().split())
def searchpath(pos, dir, st):
pos = deepcopy(pos)
dir = deepcopy(dir)
st = deepcopy(st)
while len(st)>0:
i = st.pop(0)
if i == 'F':
if dir == 'r':
pos = [pos[0]+1, pos[1]]
... |
s791074782 | p03488 | u454760747 | 1599900338 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2209 | 193016 | 1050 | from copy import deepcopy
s = list(input())
a, b = map(int, input().split())
def searchpath(pos, dir, st):
pos = deepcopy(pos)
dir = deepcopy(dir)
st = deepcopy(st)
while len(st)>0:
i = st.pop(0)
if i == 'F':
if dir == 'r':
pos = [pos[0]+1, pos[1]]
... |
s533155040 | p03488 | u935558307 | 1598745242 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1888 | 268072 | 967 | """
ベクトルが(a,b)離れた地点が目的地の状況で命令Sが与えられたとき、目的地に到達可能か?
というDPをすればよい。
"""
s = input()
x,y = map(int,input().split())
splitS = list(s.split("T"))
default = (splitS[0].count("F"),0)
yoko = []
for i in range(2,len(splitS),2):
yoko.append(splitS[i].count("F"))
tate = []
for i in range(1,len(splitS),2):
tate.append(spli... |
s476937274 | p03488 | u935558307 | 1598742982 | Python | PyPy3 (7.3.0) | py | Runtime Error | 140 | 81280 | 1487 | """
ベクトルが(a,b)離れた地点が目的地の状況で命令Sが与えられたとき、目的地に到達可能か?
というDPをすればよい。
"""
s = list(input())
x,y = map(int,input().split())
#memo[(i,a,b,v)] => のこりの命令がS[i:]ある状態で、今いる地点は(a,b)、今向いているベクトルはvという状態で目的地に到達可能か?
memo = {}
FCount = s.count("F")
def f(i,a,b,rest,v):
if (i,a,b,v) not in memo:
if rest < abs(x-a)+abs(y-b) or (r... |
s760930325 | p03488 | u074220993 | 1598742915 | Python | Python (3.8.2) | py | Runtime Error | 113 | 27176 | 592 | import numpy as np
s = input()
x, y = (int(x) for x in input().split())
Move = []
cnt = 0
s += 'T'
for c in s:
if c == 'F':
cnt += 1
else:
Move.append(cnt)
cnt = 0
Move = np.array(Move)
X = Move[Move.index % 2 == 0]
Y = Move[Move.index % 2 == 1]
lenX = len(X)-1
Xmoveable = {X[0] + sum(-X... |
s516337749 | p03488 | u489959379 | 1597511592 | Python | PyPy3 (7.3.0) | py | Runtime Error | 187 | 75176 | 1048 | import sys
sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7
MAX = 8010
def resolve():
S = input()
X, Y = map(int, input().split())
x = 0
y = 0
flg = 1
for s in S:
if s == "F":
if flg:
x += 1
else:
y += 1
... |
s913294383 | p03488 | u823862638 | 1596832064 | Python | PyPy3 (7.3.0) | py | Runtime Error | 100 | 74680 | 1287 | // C++ 14
#include <bits/stdc++.h>
using namespace std;
template <typename T> ostream& operator<<(ostream& os, const vector<T>& v) { os << "["; for (int i = 0; i < v.size(); ++i) { os << v[i]; if (i != v.size() - 1) os << ", "; } os << "]"; return os; }
template <typename T> void print(T v, string s = "\n") ... |
s296548488 | p03488 | u823862638 | 1596831468 | Python | PyPy3 (7.3.0) | py | Runtime Error | 158 | 104312 | 630 | OFFSET = 900
s = input()
tx,ty = map(int,input().split())
F = [len(s) for s in s.split('T')]
tx += OFFSET
ty += OFFSET
tx -= F[0]
Fx = F[2::2]
Fy = F[1::2]
def dfs(x, i, tgt, dp, f_list):
if dp[x][i]:
return
dp[x][i] = True
if i >= len(f_list):
return
d = f_list[i]
dfs(x + d, i + 1, tgt, dp, f... |
s186553964 | p03488 | u786020649 | 1596771795 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9288 | 686 | import sys
read=sys.stdin.read
readline=sys.stdin.readline
def isinsums(x,lst):
s=sum(lst)
t=(s+x)//2
if s==0 and x==0:
return True
if (s-x)%2 or t<0:
return False
t=(s+x)//2
m1=1<<(t+1)-1
m2=1<<t
sums=0
for e in lst:
sms=(sums|(1+sums)<<e)&m1
sms|=1
if (sms)&m2>0:
return True
r... |
s770529405 | p03488 | u786020649 | 1596771719 | Python | Python (3.8.2) | py | Runtime Error | 37 | 9464 | 703 | import sys
read=sys.stdin.read
readline=sys.stdin.readline
def isinsums(x,lst):
s=sum(lst)
t=(s+x)//2
if s==0 and x==0:
return True
if (s-x)%2 or t<0:
return False
t=(s+x)//2
m1=1<<(t+1)-1
m2=1<<t
sums=0
for e in lst:
sms=(sums|(1+sums)<<e)&m1
sms|=1
if (sms)&m2>0:
return True
r... |
s246030561 | p03488 | u786020649 | 1596749869 | Python | Python (3.8.2) | py | Runtime Error | 33 | 9360 | 698 | import sys
read=sys.stdin.read
readline=sys.stdin.readline
def isinsums(x,lst):
if not lst:
if x:
return False
else:
return True
s=sum(lst)
if (s-x)%2:
return False
t=(s+x)//2
m1=1<<(t+1)-1
m2=1<<t
sums=0
for e in lst:
sms=(sums|(1+sums)<<e)&m1
if (sms|1)&m2>0:
ret... |
s494729594 | p03488 | u786020649 | 1596749832 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9356 | 708 | import sys
read=sys.stdin.read
readline=sys.stdin.readline
def isinsums(x,lst):
if not lst:
if x:
return False
else:
return True
s=sum(lst)
if (s-x)%2:
return False
t=(s+x)//2
m1=1<<(t+1)-1
m2=1<<t
sums=0
for e in lst:
sms=(sums|(1+sums)<<e)&m1
if (sms|1)&m2>0:
ret... |
s010313438 | p03488 | u021548497 | 1596572898 | Python | PyPy3 (7.3.0) | py | Runtime Error | 116 | 76292 | 1400 | def main():
s = input()
n = len(s)
x, y = map(int, input().split())
dpx = [[False, False] for _ in range(n)]
dpy = [[False, False] for _ in range(n)]
dpx[0][0] = True
dpy[0][0] = True
x_turn = False
y_turn = False
judge = True
turn = False
xcount = 0
count = 0
for i in range(n):
if jud... |
s830644276 | p03488 | u021548497 | 1596572692 | Python | PyPy3 (7.3.0) | py | Runtime Error | 296 | 75736 | 1525 | def main():
s = input()
n = len(s)
x, y = map(int, input().split())
x_max = 0
y_max = 0
dpx = [[False, False] for _ in range(n+2)]
dpy = [[False, False] for _ in range(n+2)]
dpx[0][0] = True
dpy[0][0] = True
x_turn = False
y_turn = False
judge = True
turn = False
xcount = 0
count = 0
... |
s927260836 | p03488 | u021548497 | 1596572364 | Python | PyPy3 (7.3.0) | py | Runtime Error | 300 | 76584 | 1576 | import sys
import copy
input = sys.stdin.readline
def main():
s = input()
n = len(s)
x, y = map(int, input().split())
x_max = 0
y_max = 0
dpx = [[False, False] for _ in range(n+1)]
dpy = [[False, False] for _ in range(n+1)]
dpx[0][0] = True
dpy[0][0] = True
x_turn = False
y_turn = False
jud... |
s061354039 | p03488 | u968166680 | 1596541403 | Python | PyPy3 (7.3.0) | py | Runtime Error | 974 | 94256 | 1216 | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def check(vec, init_pos, target_pos):
base = 8000
N = len(vec)
M = 2 * base + 1
dp = [False] * M
dp[init_pos + base] = True
for i in ra... |
s735653441 | p03488 | u028973125 | 1596076595 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2250 | 1368392 | 948 | import sys
s = sys.stdin.readline().strip()
x, y = map(int, sys.stdin.readline().split())
goal = {"x": x, "y": y}
dist = {"x": [], "y": []}
if s[-1] != "T":
s += "T"
d = 0
f = 0
for i in s:
if i == "F":
d += 1
else:
if f % 2 == 0:
dist["x"].append(d)
else:
... |
s875160461 | p03488 | u028973125 | 1596076488 | Python | Python (3.8.2) | py | Runtime Error | 2225 | 519340 | 948 | import sys
s = sys.stdin.readline().strip()
x, y = map(int, sys.stdin.readline().split())
goal = {"x": x, "y": y}
dist = {"x": [], "y": []}
if s[-1] != "T":
s += "T"
d = 0
f = 0
for i in s:
if i == "F":
d += 1
else:
if f % 2 == 0:
dist["x"].append(d)
else:
... |
s554519949 | p03488 | u860829879 | 1595707791 | Python | PyPy3 (7.3.0) | py | Runtime Error | 337 | 81988 | 1035 | s=input()+'T'
x,y=list(map(int,input().split()))
x+=8000
y+=8000
n=len(s)
i=0
while i<n and s[i]=='F':
i+=1
dx=[[0]*16001 for _ in range(2)]
dy=[[0]*16001 for _ in range(2)]
dx[0][i+8000]=1
dy[0][8000]=1
lstx=[]
lsty=[]
d='x'
cnt=0
while i<n:
if s[i]=='F':
cnt+=1
else:
if cnt>0:
... |
s017561864 | p03488 | u644907318 | 1595557098 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2224 | 619364 | 1891 | s = input().strip()
N = len(s)
x,y = map(int,input().split())
flag0 = 0
for i in range(N):
if s[i]=="T":
ind = i
flag0 = 1
break
if flag0==0:
if y==0 and x==N:
print("Yes")
else:
print("No")
else:
C={"x":[],"y":[]}
flag=0
cnt = 0
for i in range(ind+1,N... |
s460557245 | p03488 | u644907318 | 1595556158 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2220 | 661752 | 1268 | s = input().strip()
N = len(s)
x,y = map(int,input().split())
for i in range(N):
if s[i]=="T":
ind = i
break
C={"x":[],"y":[]}
flag=0
cnt = 0
for i in range(ind+1,N):
if s[i]!="T":
cnt += 1
else:
if flag==0 and cnt>0:
C["y"].append(cnt)
elif flag==1 and cn... |
s457760632 | p03488 | u896004073 | 1595214576 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9716 | 807 | import sys
sys.setrecursionlimit(3000)
from functools import lru_cache
Fseq = list(map(len, input().split("T")))
x, y = map(int, input().split(" "))
Fseq_x = list(filter(lambda x:x>0, sorted(Fseq[0::2])))[::-1]
Fseq_y = list(filter(lambda x:x>0, sorted(Fseq[1::2])))[::-1]
def check(seq, target):
s = sum(seq)... |
s670954215 | p03488 | u896004073 | 1595214533 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8884 | 814 | import sys
sys.setrecursionlimit(3000)
from functools import import lru_cache
Fseq = list(map(len, input().split("T")))
x, y = map(int, input().split(" "))
Fseq_x = list(filter(lambda x:x>0, sorted(Fseq[0::2])))[::-1]
Fseq_y = list(filter(lambda x:x>0, sorted(Fseq[1::2])))[::-1]
def check(seq, target):
s = s... |
s906787190 | p03488 | u896004073 | 1595212738 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 36672 | 885 | import sys
sys.setrecursionlimit(2000)
Fseq = list(map(len, input().split("T")))
x, y = map(int, input().split(" "))
Fseq_x = sorted(Fseq[0::2])
Fseq_y = sorted(Fseq[1::2])
for i, f in enumerate(Fseq_x):
if f > 0:
break
Fseq_x = Fseq_x[i:]
Fseq_x = Fseq_x[::-1]
for i, f in enumerate(Fseq_y):
if f ... |
s033656151 | p03488 | u896004073 | 1595212607 | Python | Python (3.8.2) | py | Runtime Error | 79 | 26536 | 813 | Fseq = list(map(len, input().split("T")))
x, y = map(int, input().split(" "))
Fseq_x = sorted(Fseq[0::2])[::-1]
Fseq_y = sorted(Fseq[1::2])[::-1]
for i, f in enumerate(Fseq_x):
if f > 0:
break
Fseq_x = Fseq_x[i:]
for i, f in enumerate(Fseq_y):
if f > 0:
break
Fseq_y = Fseq_y[i:]
def check... |
s188747866 | p03488 | u896004073 | 1595212325 | Python | Python (3.8.2) | py | Runtime Error | 86 | 26748 | 865 | Fseq = list(map(len, input().split("T")))
x, y = map(int, input().split(" "))
Fseq_x = sorted(Fseq[0::2])[::-1]
Fseq_y = sorted(Fseq[1::2])[::-1]
for i, f in enumerate(Fseq_x):
if f > 0:
break
Fseq_x = Fseq_x[i:]
for i, f in enumerate(Fseq_y):
if f > 0:
break
Fseq_y = Fseq_y[i:]
def check... |
s063642455 | p03488 | u896004073 | 1595211421 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 26736 | 894 | Fseq = list(map(len, input().split("T")))
x, y = map(int, input().split(" "))
Fseq_x = sorted(Fseq[0::2])[::-1]
Fseq_y = sorted(Fseq[1::2])[::-1]
for i, f in enumerate(Fseq_x):
if f > 0:
break
Fseq_x = Fseq_x[i:]
for i, f in enumerate(Fseq_y):
if f > 0:
break
Fseq_y = Fseq_y[i:]
print(Fseq... |
s564090856 | p03488 | u896004073 | 1595210822 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 36472 | 692 | Fseq = list(map(len, input().split("T")))
x, y = map(int, input().split(" "))
Fseq_x = sorted(Fseq[0::2])
Fseq_y = sorted(Fseq[1::2])
def check(seq, target):
s = sum(seq)
new_target = s+target
if new_target % 2 == 1:
return False
new_target = new_target // 2
return check2(seq, new_target)... |
s204147351 | p03488 | u896004073 | 1595210398 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 36756 | 666 | Fseq = list(map(len, input().split("T")))
x, y = map(int, input().split(" "))
Fseq_x = sorted(Fseq[0::2])
Fseq_y = sorted(Fseq[1::2])
def check(seq, target):
s = sum(seq)
new_target = s+target
if new_target % 2 == 1:
return False
new_target = new_target // 2
return check2(seq, new_target)... |
s002822023 | p03488 | u970197315 | 1593972826 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1704 | 740644 | 583 | s=input()
x,y=map(int,input().split())
t=s.split("T")
x-=len(t[0])
dx,dy=[],[]
for i,tt in enumerate(t[1:]):
if i%2==1:
dx.append(len(tt))
else:
dy.append(len(tt))
def is_ok(n,l):
dp=[[0]*16001 for _ in range(len(l)+1)]
n+=8000
dp[0][8000]=1
for i in range(1,len(l)+1):
for j in range(16001):
... |
s057528744 | p03488 | u970197315 | 1593966043 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1668 | 683784 | 582 | s=input()
x,y=map(int,input().split())
t=s.split("T")
x-=len(t[0])
dx,dy=[],[]
for i,tt in enumerate(t[1:]):
if i%2==1:
dx.append(len(tt))
else:
dy.append(len(tt))
def is_ok(n,l):
dp=[[0]*18001 for _ in range(len(l)+1)]
n+=9000
dp[0][9000]=1
for i in range(1,len(l)+1):
for j in range(18001):
... |
s928241072 | p03488 | u970197315 | 1593965893 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1740 | 696288 | 583 | s=input()
x,y=map(int,input().split())
t=s.split("T")
x-=len(t[0])
dx,dy=[],[]
for i,tt in enumerate(t[1:]):
if i%2==1:
dx.append(len(tt))
else:
dy.append(len(tt))
def is_ok(n,l):
dp=[[0]*20001 for _ in range(len(l)+1)]
n+=10000
dp[0][10000]=1
for i in range(1,len(l)+1):
for j in range(20001):... |
s898257385 | p03488 | u970197315 | 1593965404 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2230 | 688716 | 587 | s=input()
x,y=map(int,input().split())
t=s.split("T")
x-=len(t[0])
dx,dy=[],[]
for i,tt in enumerate(t[1:]):
if i%2==1:
dx.append(len(tt))
else:
dy.append(len(tt))
def is_ok(n,l):
dp=[[False]*20001 for _ in range(len(l)+1)]
n+=10000
dp[0][10000]=True
for i in range(1,len(l)+1):
for j in range(... |
s943756843 | p03488 | u127499732 | 1593485725 | Python | PyPy3 (7.3.0) | py | Runtime Error | 86 | 68700 | 731 | def main():
from collections import deque
import numpy as np
s = input() + 'T'
x, y = map(int, input().split())
m = [[], []]
i = 0
c = 0
for k in s:
if k == 'F':
c += 1
else:
m[i].append(c)
c = 0
i = 1 - i
xs = deque(m... |
s698439686 | p03488 | u145231176 | 1593477214 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2243 | 1177112 | 2105 | def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
def input():
return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
return random.randint(ran1,... |
s360163586 | p03488 | u145231176 | 1593476077 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1375 | 638968 | 2090 | def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
def input():
return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
return random.randint(ran1,... |
s827514861 | p03488 | u145231176 | 1593473740 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2234 | 1022108 | 2006 | def getN():
return int(input())
def getNM():
return map(int, input().split())
def getList():
return list(map(int, input().split()))
def getArray(intn):
return [int(input()) for i in range(intn)]
def input():
return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
return random.randint(ran1,... |
s670340233 | p03488 | u844646164 | 1593397883 | Python | PyPy3 (7.3.0) | py | Runtime Error | 353 | 291940 | 2585 | from collections import Counter
s = list(input())
x, y = map(int, input().split())
cs = Counter(s)
ss = []
idx = 0
cnt = 0
while idx < len(s):
if s[idx] == 'F':
cnt += 1
else:
if cnt != 0:
ss += [cnt]
ss += [0]
cnt = 0
idx += 1
if idx == len(s):
if ... |
s909905803 | p03488 | u844646164 | 1593397850 | Python | PyPy3 (7.3.0) | py | Runtime Error | 359 | 292028 | 2599 | from collections import Counter
s = list(input())
x, y = map(int, input().split())
cs = Counter(s)
ss = []
idx = 0
cnt = 0
while idx < len(s):
if s[idx] == 'F':
cnt += 1
else:
if cnt != 0:
ss += [cnt]
ss += [0]
cnt = 0
idx += 1
if idx == len(s):
if ... |
s955561190 | p03488 | u844646164 | 1593397520 | Python | PyPy3 (7.3.0) | py | Runtime Error | 345 | 292016 | 2465 | from collections import Counter
s = list(input())
x, y = map(int, input().split())
cs = Counter(s)
ss = []
idx = 0
cnt = 0
while idx < len(s):
if s[idx] == 'F':
cnt += 1
else:
if cnt != 0:
ss += [cnt]
ss += [0]
cnt = 0
idx += 1
if idx == len(s):
if ... |
s669482586 | p03488 | u844646164 | 1593397116 | Python | PyPy3 (7.3.0) | py | Runtime Error | 347 | 292176 | 2293 | from collections import Counter
s = list(input())
x, y = map(int, input().split())
cs = Counter(s)
ss = []
idx = 0
cnt = 0
while idx < len(s):
if s[idx] == 'F':
cnt += 1
else:
if cnt != 0:
ss += [cnt]
ss += [0]
cnt = 0
idx += 1
if idx == len(s):
if ... |
s681458586 | p03488 | u844646164 | 1593396939 | Python | PyPy3 (7.3.0) | py | Runtime Error | 306 | 195648 | 2273 | from collections import Counter
s = list(input())
x, y = map(int, input().split())
cs = Counter(s)
ss = []
idx = 0
cnt = 0
while idx < len(s):
if s[idx] == 'F':
cnt += 1
else:
if cnt != 0:
ss += [cnt]
ss += [0]
cnt = 0
idx += 1
if idx == len(s):
if ... |
s550351996 | p03488 | u763280125 | 1593311873 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9736 | 1372 | MAX_SIZE = 16_000
OFFSET = 8_000
X = [[False for _ in range(MAX_SIZE)] for _ in range(2)]
Y = [[False for _ in range(MAX_SIZE)] for _ in range(2)]
s = input()
x, y = input().split()
N = len(s)
x, y = int(x), int(y)
i = 0
d = 0
j = 0
while i < N and s[i] == 'F':
d += 1
i += 1
X[j][d + OFFSET] = True
i += 1
d... |
s407908254 | p03488 | u763280125 | 1593311819 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9792 | 1372 | MAX_SIZE = 16_000
OFFSET = 8_000
X = [[False for _ in range(MAX_SIZE)] for _ in range(2)]
Y = [[False for _ in range(MAX_SIZE)] for _ in range(2)]
s = input()
x, y = input().split()
N = len(s)
x, y = int(x), int(y)
i = 0
d = 0
j = 0
while i < N and s[i] == 'F':
d += 1
i += 1
X[j][d + OFFSET] = True
i += 1
d... |
s650683539 | p03488 | u439542873 | 1593298998 | Python | Python (3.8.2) | py | Runtime Error | 1463 | 1086108 | 1101 | s = input() + "T"
x, y = map(int, input().split())
stepx = []
stepy = []
headx = True
step = 0
for c in s:
if c == "F":
step += 1
else:
if headx:
stepx.append(step)
else:
stepy.append(step)
headx = not headx
step = 0
x -= stepx[0]
stepx = stepx[... |
s899996278 | p03488 | u852690916 | 1593085490 | Python | PyPy3 (7.3.0) | py | Runtime Error | 192 | 74928 | 1295 | # でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
from itertools import groupby
import sys
def main(s, x, y):
g = [x, y]
o = [[], []]
direction = count = 0
first = True
for c in s:
if c == 'T':
if first:
g[0] -= count
first = False
elif c... |
s968698141 | p03488 | u070201429 | 1592880935 | Python | PyPy3 (7.3.0) | py | Runtime Error | 85 | 75100 | 959 | s = input()
x, y = map(int, input().split())
y = abs(y)
lx, ly = [], []
flag = True
n = 0
s += 'T'
for i in s:
if i == 'F':
n += 1
else:
if n > 0:
if flag:
lx.append(n)
else:
ly.append(n)
n = 0
flag = not flag
if x != ... |
s180908531 | p03488 | u070201429 | 1592880874 | Python | PyPy3 (7.3.0) | py | Runtime Error | 92 | 75128 | 943 | s = input()
x, y = map(int, input().split())
y = abs(y)
lx, ly = [], []
flag = True
n = 0
s += 'T'
for i in s:
if i == 'F':
n += 1
else:
if n > 0:
if flag:
lx.append(n)
else:
ly.append(n)
n = 0
flag = not flag
x = abs(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.