s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s714944906 | p04012 | u023229441 | 1551237589 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 96 | s=input()
s=list(s)
for i in s:
if s.count(s[i])%2==1:
print("No")
exit()
print("Yes") | Traceback (most recent call last):
File "/tmp/tmp4qpk2f8t/tmplkehvt8u.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s105399236 | p04012 | u952130512 | 1550487885 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 181 | w=input()
s=[0]*123
for i in len(w):
s[ord(w[i-1])]+=1
c=1
for i in range(97,97+26):
if s[i]%2==1:
c=0
break
if c==1:
print("Yes")
else:
print("No")
| Traceback (most recent call last):
File "/tmp/tmpy4ecpqa7/tmpb_0zcm8p.py", line 1, in <module>
w=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s973379677 | p04012 | u952130512 | 1550487225 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 246 | w=input()
s=[0]*123
while len(w)==0:
for i in range(97,97+26):
if chr(i)==w[0]:
s[i]+=1
w=w[1:]
c=1
for i in range(97,97+26):
if s[i]%2!=0:
c=0
break
if c==1:
print("Yes")
else:
print("No")
| File "/tmp/tmp1lwt72oo/tmp_z2uty_5.py", line 6
s[i]+=1
^
IndentationError: expected an indented block after 'if' statement on line 5
| |
s643497576 | p04012 | u952130512 | 1550487153 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 272 | w=input()
s=[0]*123
while len(w)==0:
for i in range(97,97+26):
if chr(i)==w[0]:
s[i]+=1
w=w[1:]
c=1
for i in range(97,97+26):
if s[i]%2==0:
continue
else:
c=0
break
if c=1:
print("Yes")
else:
print("No")
| File "/tmp/tmpnbz_fdag/tmp1rd5x7_5.py", line 6
s[i]+=1
^
IndentationError: expected an indented block after 'if' statement on line 5
| |
s015845746 | p04012 | u952130512 | 1550487090 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 273 | w=input()
s=[0]*123
while(len(w)==0):
for i in range(97,97+26):
if chr(i)==w[0]:
s[i]+=1
w=w[1:]
c=1
for i in range(97,97+26):
if s[i]%2==0:
continue
else:
c=0
break
if c=1:
print("Yes")
else:
print("No")
| File "/tmp/tmpnvjqiq_g/tmpx34lrubs.py", line 6
s[i]+=1
^
IndentationError: expected an indented block after 'if' statement on line 5
| |
s035876876 | p04012 | u518064858 | 1550383497 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 150 | s=input()
p=list(set(list(s)))
a=[]
for i in p:
a.append(s.count(i))
for x in a:
if x%2!==0:
print("No")
exit()
print("Yes")
| File "/tmp/tmpmvsp2jf3/tmpd_d783g3.py", line 7
if x%2!==0:
^
SyntaxError: invalid syntax
| |
s842754421 | p04012 | u518064858 | 1550383448 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 148 | s=input()
p=list(set(list(s)))
a=[]
for i in p
a.append(s.count(i))
for x in a:
if x%2!==0:
print("No")
exit()
print("Yes")
| File "/tmp/tmpk3v401rf/tmphlei1llb.py", line 4
for i in p
^
SyntaxError: expected ':'
| |
s248515623 | p04012 | u367130284 | 1549828729 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 85 | d={c:list(input()) for c in "abc"}
s="a"
while d[s]:
s=d[s].pop(0)
print(s.upper()) | Traceback (most recent call last):
File "/tmp/tmpcz2cvo1k/tmp3rlqbuds.py", line 1, in <module>
d={c:list(input()) for c in "abc"}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/tmpcz2cvo1k/tmp3rlqbuds.py", line 1, in <dictcomp>
d={c:list(input()) for c in "abc"}
^^^^^^^
EOFError: EOF when r... | |
s563909811 | p04012 | u089032001 | 1546369176 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 137 | from collection import Counter
S = Counter(list(input()))
for k, v in S.items():
if v % 2 == 1:
print("No")
exit()
print("Yes") | Traceback (most recent call last):
File "/tmp/tmpjedcbx2o/tmpdsjrl1fu.py", line 1, in <module>
from collection import Counter
ModuleNotFoundError: No module named 'collection'
| |
s815643729 | p04012 | u762420987 | 1545619198 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 480 | //https://atcoder.jp/contests/abc044/tasks/abc044_b
//044-BをC++でといてみる
#include<iostream>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
int main(void){
string w; cin >> w;
map<char,int> mp;
int i;
for (i = 0; i < w.size(); i++){
mp[w[i]] += 1;
}
for (pair<char,... | File "/tmp/tmp_blck3_n/tmp3pjyc_94.py", line 2
//044-BをC++でといてみる
^
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
| |
s665057068 | p04012 | u782098901 | 1545496668 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 369 | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main() {
string w;
cin >> w;
map<char, int> count;
for (auto s : w) {
count[s] += 1;
}
for (auto itr = count.begin(); itr != count.end(); itr++) {
if (itr->second % 2 == 1) {
cout << "No" << endl;
return 0;
... | File "/tmp/tmp6a_t16b4/tmp3mphrcer.py", line 4
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s649604466 | p04012 | u284854859 | 1545419652 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 685 | n,a = map(int,input().split())
x = list(map(int,input().split()))
#dp[j][k][s] = (x0...xj からk枚選んでxiの合計をsにするような選び方の総数)
dp = [[[0 for s in range(a*n+1) ] for k in range(n+1) ] for j in range(n)]
for j in range(n):
dp[j][0][0]=1
if x[0]<= a*n:
dp[j][1][x[0]] = 1
for j in range(n-1):
for k in range(n... | Traceback (most recent call last):
File "/tmp/tmpjisp_4mg/tmp3t6x7o83.py", line 1, in <module>
n,a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s526178871 | p04012 | u397531548 | 1541557884 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 136 | from collections import Counter
num=Counter(input())
ans="YES"
for X in num.values():
if X%2!=0:
ans="NO"
print(ans) | File "/tmp/tmp5tzvj54c/tmpr1cc8d9h.py", line 4
ans="YES"
IndentationError: unexpected indent
| |
s442940448 | p04012 | u432805419 | 1541474219 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | a = list(input())
b = list(set(a))
for i in range(b):
if a.count(b[i]) % 2 != 0:
print("No")
break
else:
print("Yes")
| Traceback (most recent call last):
File "/tmp/tmp1y0bi3wf/tmpcad16igx.py", line 1, in <module>
a = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s656426363 | p04012 | u657913472 | 1537906390 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 90 | s=input();c=[f=0]*26
for i in s:c[ord(i)-97]+=1
for i in c:f+=i%2
print("YNeos"[(f>0)::2]) | File "/tmp/tmpis2jnh_t/tmpplkmjfz_.py", line 1
s=input();c=[f=0]*26
^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s163787253 | p04012 | u657913472 | 1537906369 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 88 | s=input();c=[f=0]*26
for i in s:c[ord(i)-97]+=1
for i in c:f+=i%2
print("YNeos"[!!f::2]) | File "/tmp/tmp3xpqiorj/tmp0lwje5mf.py", line 1
s=input();c=[f=0]*26
^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s802251633 | p04012 | u787562674 | 1536535893 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 114 | w = input())
for s in set(w):
if w.count(s) % 2 != 0:
print('No')
break
else:
print('Yes') | File "/tmp/tmp39jo30qw/tmpkmt17j3k.py", line 1
w = input())
^
SyntaxError: unmatched ')'
| |
s824817002 | p04012 | u409064224 | 1530229110 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 328 | s = input()
#l = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
l = []
roll = ord('z')-ord('a')
for i in range(roll):
l.append(0)
for i in range(len(s)):
num = ord(s[i])
l[num-97] += 1
#print(num)
for i in range(roll):
if l[i]%2 != 0:
print("No")
break
else:
print... | Traceback (most recent call last):
File "/tmp/tmp5gu40nug/tmpvb6ecera.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s745936581 | p04012 | u409064224 | 1530228978 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 328 | s = input()
#l = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
l = []
roll = ord('z')-ord('a')
for i in range(roll):
l.append(0)
for i in range(len(s)):
num = ord(s[i])
l[num-97] += 1
#print(num)
for i in range(roll):
if l[i]%2 != 0:
print("No")
exit()
else:
prin... | Traceback (most recent call last):
File "/tmp/tmpf9wadumn/tmpjad6vr75.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s678137372 | p04012 | u894440853 | 1528375448 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 80 | S = input()
print("Yes" if all([S.count(e) % 2 == 0 for e in set(S)] else "No")) | File "/tmp/tmpgxau8o0o/tmptv3zhunm.py", line 2
print("Yes" if all([S.count(e) % 2 == 0 for e in set(S)] else "No"))
^^^^^^^^^^^^
SyntaxError: expected 'else' after 'if' expression
| |
s611582427 | p04012 | u894440853 | 1528375139 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 118 | S = input()
S_elements = set(s)
for e in S_elements:
if S.count(e) % 2 != 0:
print("No")
exit()
print("Yes") | Traceback (most recent call last):
File "/tmp/tmpg7o33wv7/tmp2b9664si.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s064906723 | p04012 | u573970531 | 1524631005 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 169 | in1 = list(input())
in1.sort()
i = 1
flg = True
while i <= len(in1):
if in1[i] != in1[i-1]:
flg = False
break
i+=2
if flg:
print("Yes")
else:
print("No") | Traceback (most recent call last):
File "/tmp/tmp_v9v6q19/tmpv3ab95qh.py", line 1, in <module>
in1 = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s969827905 | p04012 | u027622859 | 1522515216 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 5 | hthth | Traceback (most recent call last):
File "/tmp/tmpc2rq8mol/tmpnfs99qvk.py", line 1, in <module>
hthth
NameError: name 'hthth' is not defined
| |
s165707929 | p04012 | u773981351 | 1521245115 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 157 | from collections import Counter
word = input()
c = Counter(word)
counts = c.values()
if all(map(lambda x: x % 2 == 0, counts)) print('Yes') else print('No') | File "/tmp/tmpfnylmldc/tmp41y2gvo7.py", line 6
if all(map(lambda x: x % 2 == 0, counts)) print('Yes') else print('No')
^^^^^
SyntaxError: invalid syntax
| |
s518824699 | p04012 | u419874471 | 1492287179 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 148 | w = input()
m = Map()
for t in w:
m[t] = m.get(t, 0) + 1
for c, cnt in m:
if cnt % 2 == 1:
print("No")
exit()
print("Yes") | Traceback (most recent call last):
File "/tmp/tmpkcvsrs0j/tmpdfi4uvee.py", line 1, in <module>
w = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s776198063 | p04012 | u419874471 | 1491932838 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 333 | #!/usr/bin/env python
#coding:utf-8
def input_strs():
return input().split(" ")
def input_nums():
return [int(i) for i in input_strs()]
w = input()
ok = True
h = Map()
for c in w:
p = 0
for k in w:
if c == k:
p += 1
ok = ok and (p % 2 == 0)
if ok:
print("Yes")
else:
... | Traceback (most recent call last):
File "/tmp/tmpzf6m65d6/tmp5_yfppxb.py", line 11, in <module>
w = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s398708205 | p04012 | u419874471 | 1491932463 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 315 | #!/usr/bin/env python
#coding:utf-8
def input_strs():
return input().split(" ")
def input_nums():
return [int(i) for i in input_strs()]
w = input()
ok = True
h = Map()
for i in w:
h[i] = h.get(i, 0) + 1
for key in h:
ok = ok and (h[key] % 2 == 0)
if ok:
print("Yes")
else:
print("No")
| Traceback (most recent call last):
File "/tmp/tmpoau_xm8v/tmpxzhes7_d.py", line 11, in <module>
w = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s602689309 | p04012 | u312012633 | 1484982105 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3316 | 256 | from collections import defaultdict
def is_beautiful(s):
d = defaultdict(int)
for c in input():
d[c] += 1
for v in d.values():
if v % 2:
return False
return True
print("YES" if is_beautiful(input()) else "NO")
| Traceback (most recent call last):
File "/tmp/tmp2o8950b7/tmp1ko7dpmi.py", line 12, in <module>
print("YES" if is_beautiful(input()) else "NO")
^^^^^^^
EOFError: EOF when reading a line
| |
s942463303 | p04012 | u830390742 | 1481430684 | Python | Python (2.7.6) | py | Runtime Error | 16 | 2568 | 112 | from collections import Counter
print 'Yes' if all(v % 2 == 0 for v in Counter(raw_input()).values())) else 'No' | File "/tmp/tmp4l_8wroc/tmp6hkj3u_h.py", line 2
print 'Yes' if all(v % 2 == 0 for v in Counter(raw_input()).values())) else 'No'
^
SyntaxError: unmatched ')'
| |
s411379669 | p04012 | u831695469 | 1478720103 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 310 | w = input()
l = list(w)
l.sort()
ans = "Yes"
for i in range(len(l)/2):
if l[2*i] != l[2*i+1]:
ans = "No"
break
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpqp0jvnvm/tmpa2_ivd1v.py", line 1, in <module>
w = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s835231184 | p04012 | u831695469 | 1478720051 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 308 | w = input()
l = list(w)
l.sort()
ans = "Yes"
for i in range(len(l)):
if l[2*i] != l[2*i+1]:
ans = "No"
break
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpzmnip_bk/tmpz7bj_hs7.py", line 1, in <module>
w = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s747029221 | p04012 | u133038626 | 1475362430 | Python | Python (3.4.3) | py | Runtime Error | 23 | 3064 | 102 | o = "Yes"
for v in collections.Counter(input().strip()).values():
if v % 2 != 0: o = "No"
print(o) | Traceback (most recent call last):
File "/tmp/tmpodgwd7w7/tmp3qz8p9ui.py", line 2, in <module>
for v in collections.Counter(input().strip()).values():
^^^^^^^^^^^
NameError: name 'collections' is not defined
| |
s354551257 | p04012 | u514826602 | 1473172197 | Python | Python (3.4.3) | py | Runtime Error | 39 | 3064 | 193 |
w = list(input())
w.sort()
isBeautiful = True
length = len(w)
for i in range(0, length, 2):
if w[i] is not w[i + 1]:
isBeautiful = False
break
print('Yes' if isBeautiful else 'No') | Traceback (most recent call last):
File "/tmp/tmpt0r2hdlw/tmpu1daf0ec.py", line 2, in <module>
w = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s544757469 | p04012 | u914627967 | 1473109242 | Python | Python (3.4.3) | py | Runtime Error | 40 | 3188 | 389 | a,b,c,d,e,f,g,h,i,j,k=0,1,2,3,4,5,6,7,8,9,10
l,m,n,o,p,q,r,s,t,u,v,w,x,y,z=11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
W=input()
W=list(W)
L=len(W)
lis=[0 for s in range(25)]
if L%2!=0:
print("No")#奇数個の場合はあり得ない
else:
for s in range(L):
temp=W[s]
lis[eval(temp)]+=1
for s in range(26):
if lis[s]%2!=0:
print... | Traceback (most recent call last):
File "/tmp/tmpph8he25z/tmpdbzj_8wu.py", line 3, in <module>
W=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s262205650 | p04012 | u030110634 | 1472759137 | Python | Python (3.4.3) | py | Runtime Error | 61 | 4084 | 155 | import string
import sys
w = raw_input()
for c in string.ascii_lowercase:
if w.count(c) % 2 == 1:
print("No")
sys.exit()
print("Yes")
| Traceback (most recent call last):
File "/tmp/tmpwvchs6nv/tmp50a0iwtz.py", line 4, in <module>
w = raw_input()
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s894699935 | p04012 | u732844340 | 1472433260 | Python | Python (3.4.3) | py | Runtime Error | 41 | 3064 | 161 | flag = 0
counter = Counter(w)
for word, cnt in counter.most_common():
if cnt % 2 != 0:
flag = 1
print("NO")
if flag == 0:
print("YES") | Traceback (most recent call last):
File "/tmp/tmpo9buh97z/tmpdn7gl08e.py", line 3, in <module>
counter = Counter(w)
^^^^^^^
NameError: name 'Counter' is not defined
| |
s505928963 | p04013 | u806976856 | 1600484271 | Python | PyPy3 (7.3.0) | py | Runtime Error | 212 | 135596 | 449 | n,a=map(int,input().split())
x=list(map(int,input().split()))
A=max(x)
x.insert(0,-1)
dp=[[[0]*(n+1) for _ in range(n*A+1)] for i in range(n+1)]
dp[1][x[1]][1]=1
dp[1][0][0]=1
for i in range(1,n):
q=x[i+1]
for s in range(n*A+1):
for k in range(i+1):
if s+q<=n*A:
dp[i+1][s+q]... | Traceback (most recent call last):
File "/tmp/tmps_e4f2r4/tmp1ckkn924.py", line 1, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s913984672 | p04013 | u381585104 | 1600071300 | Python | Python (3.8.2) | py | Runtime Error | 2208 | 82816 | 1098 | class Combination:
def __init__(self, n, mod):
self.n = n
self.mod = mod
self.fac = [1 for i in range(self.n + 1)]
self.finv = [1 for i in range(self.n + 1)]
for i in range(2, self.n+1):
self.fac[i] = (self.fac[i - 1] * i) % self.mod
self.finv[i] = (se... | Traceback (most recent call last):
File "/tmp/tmp889gjd_0/tmpnkvvb1fc.py", line 17, in <module>
n, a = iparse()
^^^^^^^^
File "/tmp/tmp889gjd_0/tmpnkvvb1fc.py", line 14, in iparse
return list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s848248834 | p04013 | u350093546 | 1599327066 | Python | PyPy3 (7.3.0) | py | Runtime Error | 152 | 119960 | 363 | n,a=map(int,input().split())
lst=list(map(int,input().split()))
z=len(lst)
dp=[[[0]*2501 for i in range(51)] for j in range(z+1)]
dp[0][0][0]=1
for i in range(z):
x=lst[i]
for j in range(i+1):
for k in range((i+1)*50):
dp[i+1][j][k]+=dp[i][j][k]
dp[i+1][j+1][k+x]+=dp[i][j][k]
ans=0
for i in rang... | Traceback (most recent call last):
File "/tmp/tmprxrzwsup/tmpf_1y9jmr.py", line 1, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s691407182 | p04013 | u161134623 | 1599029949 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9156 | 561 | def function(b, n):
if n < b:
return n
else:
return function(b, n//b) + n % b
from math import sqrt
def divs(n):
d=[]
for x in range(1,int(sqrt(n))+1):
if n%x==0:
d.extend([x,n//x])
d=list(set(d))
d.sort()
return d
def main():
n = int(input())
s = int(input())
i... | Traceback (most recent call last):
File "/tmp/tmpixn6m4_0/tmp7dfrx0lz.py", line 32, in <module>
print(main())
^^^^^^
File "/tmp/tmpixn6m4_0/tmp7dfrx0lz.py", line 17, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s414464503 | p04013 | u787059958 | 1598625113 | Python | Python (3.8.2) | py | Runtime Error | 1942 | 71596 | 574 | N, A = map(int, input().split())
X = [0] + list(map(int, input().split()))
max_X = max(X)
dp = [[[0 for k in range((N + 1) * max_X)]
for j in range(N + 1)] for i in range(N + 1)]
for i in range(N + 1):
dp[i][0][0] = 1
for j in range(1, N + 1):
for k in range(1, j + 1):
for s in range((N + 1) * ... | Traceback (most recent call last):
File "/tmp/tmpho3a4wn_/tmphwpz0_u2.py", line 1, in <module>
N, A = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s684639795 | p04013 | u787059958 | 1598624807 | Python | Python (3.8.2) | py | Runtime Error | 1953 | 71604 | 560 | N, A = map(int, input().split())
X = [0] + list(map(int, input().split()))
dp = [[[0 for k in range((N + 1) * max(X))]
for j in range(N + 1)] for i in range(N + 1)]
for i in range(N + 1):
dp[i][0][0] = 1
for j in range(1, N + 1):
for k in range(1, j + 1):
for s in range((N + 1) * max(X)):
... | Traceback (most recent call last):
File "/tmp/tmpkaos2jv4/tmprvxw2puu.py", line 1, in <module>
N, A = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s547682933 | p04013 | u191874006 | 1598024434 | Python | PyPy3 (7.3.0) | py | Runtime Error | 102 | 79760 | 950 | #!/usr/bin/env python3
import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collection... | Traceback (most recent call last):
File "/tmp/tmpo9qzf7d4/tmpw8jgw8tj.py", line 20, in <module>
n, a = LI()
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s104264882 | p04013 | u489959379 | 1597463106 | Python | PyPy3 (7.3.0) | py | Runtime Error | 188 | 118220 | 666 | import sys
sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7
def resolve():
n, a = map(int, input().split())
X = list(map(int, input().split()))
MAX = sum(X) + 1
dp = [[[0] * MAX for _ in range(n + 1)] for _ in range(n + 1)]
dp[0][0][0] = 1
for i in range(1, n + 1):
... | Traceback (most recent call last):
File "/tmp/tmpbt0m3xe4/tmpott7pmwc.py", line 29, in <module>
resolve()
File "/tmp/tmpbt0m3xe4/tmpott7pmwc.py", line 9, in resolve
n, a = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s385643419 | p04013 | u188745744 | 1596085813 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 60904 | 504 | N,A= list(map(int,input().split()))
l=list(map(int,input().split()))
max_l=max(l)
DP=[[[0]*(max_l*N+1) for _ in range(N+1)] for j in range(N+1)]
DP[0][0][0]=1
for i in range(0,N+1):#カード全体の枚数
for j in range(0,N+1):
for k in range(0,N*max_l+1):
if i >= 1 and k<l[i-1]:
DP[i][j][k]=DP[i-1][j][... | Traceback (most recent call last):
File "/tmp/tmp9pluzl9m/tmpq9g1dzfk.py", line 1, in <module>
N,A= list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s555936601 | p04013 | u311379832 | 1595994453 | Python | Python (3.8.2) | py | Runtime Error | 1023 | 71404 | 477 | N, A = map(int, input().split())
x = list(map(int, input().split()))
maxX = max(x)
dp = [[[0 for _ in range(N * maxX + 1)] for _ in range(N + 1)] for _ in range(N + 1)]
dp[0][0][0] = 1
for i in range(N):
for j in range(N + 1):
for k in range(N * A + 1):
if dp[i][j][k] == 0: continue
... | Traceback (most recent call last):
File "/tmp/tmpbqdboexs/tmp80j0ine0.py", line 1, in <module>
N, A = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s236517936 | p04013 | u551857719 | 1595868597 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9376 | 1687 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
from collections import defaultdict
from operator import mul
from functools import reduce
def combinations_count(n, r):
r = min(r, n - r)
numer = reduce(mul, range(n, n - r, -1), 1)
denom = reduce(mul, range(1, r + 1), 1)
return numer // denom
def subset_su... | Traceback (most recent call last):
File "/tmp/tmplohsvikr/tmpyw0fya78.py", line 76, in <module>
_main()
File "/tmp/tmplohsvikr/tmpyw0fya78.py", line 27, in _main
N, A = get_ints()
^^^^^^^^
NameError: name 'get_ints' is not defined
| |
s510981029 | p04013 | u758815106 | 1595718126 | Python | Python (3.8.2) | py | Runtime Error | 1760 | 69196 | 515 | N, A = map(int, input().split())
x = list(map(int, input().split()))
maxint = 50 * max(x)
dp = [[[0] * (maxint + 1) for _ in range(N + 1)] for _ in range(N + 1)]
dp[0][0][0] = 1
for xi, xe in enumerate(x, 1):
for j in range(xi+1):
for k in range(maxint + 1):
dp[xi][j][k] = dp[xi - 1][j][k]
... | Traceback (most recent call last):
File "/tmp/tmpbb00tbg5/tmpi1umakmg.py", line 1, in <module>
N, A = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s805199471 | p04013 | u968166680 | 1595070787 | Python | PyPy3 (7.3.0) | py | Runtime Error | 89 | 75160 | 591 | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
N, A, *X = map(int, read().split())
M = sum(X)
dp = [[0] * (M + 1) for j in range(N + 1)]
dp[0][0] = 1
for i in range(N):
... | Traceback (most recent call last):
File "/tmp/tmp1wvofh9s/tmp_c1rh3j1.py", line 32, in <module>
main()
File "/tmp/tmp1wvofh9s/tmp_c1rh3j1.py", line 12, in main
N, A, *X = map(int, read().split())
^^^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s503799018 | p04013 | u968166680 | 1595070690 | Python | PyPy3 (7.3.0) | py | Runtime Error | 377 | 80420 | 582 | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
N, A, *X = map(int, read().split())
M = sum(X)
dp = [[0] * (M + 1) for j in range(N + 1)]
dp[0][0] = 1
for i in range(N):
... | Traceback (most recent call last):
File "/tmp/tmps1mqer6c/tmp29a97mgc.py", line 32, in <module>
main()
File "/tmp/tmps1mqer6c/tmp29a97mgc.py", line 12, in main
N, A, *X = map(int, read().split())
^^^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s092859440 | p04013 | u968166680 | 1595070346 | Python | PyPy3 (7.3.0) | py | Runtime Error | 373 | 75540 | 582 | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
N, A, *X = map(int, read().split())
M = sum(X)
dp = [[0] * (M + 1) for j in range(N + 1)]
dp[0][0] = 1
for i in range(N):
... | Traceback (most recent call last):
File "/tmp/tmppj2z8udu/tmpgdytjmjb.py", line 32, in <module>
main()
File "/tmp/tmppj2z8udu/tmpgdytjmjb.py", line 12, in main
N, A, *X = map(int, read().split())
^^^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s039290245 | p04013 | u968166680 | 1595070158 | Python | PyPy3 (7.3.0) | py | Runtime Error | 93 | 75352 | 577 | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
N, A, *X = map(int, read().split())
M = sum(X)
dp = [[0] * (M + 1) for j in range(N + 1)]
dp[0][0] = 1
for i in range(N):
... | Traceback (most recent call last):
File "/tmp/tmpcp1uevmr/tmpuvlkzmno.py", line 32, in <module>
main()
File "/tmp/tmpcp1uevmr/tmpuvlkzmno.py", line 12, in main
N, A, *X = map(int, read().split())
^^^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s204940097 | p04013 | u786020649 | 1594355047 | Python | Python (3.8.2) | py | Runtime Error | 2205 | 9312 | 958 | from collections import deque
n,a=map(int,input().split())
cards=list(map(int,input().split()))
noz=[x-a for x in cards].count(0)
pl=[x-a for x in cards if x-a>0]
nl=[a-x for x in cards if x-a<0]
sl=[pl,nl][len(nl)<=len(pl)]
ll=[pl,nl][len(pl)<len(nl)]
sl.sort()
ll.sort()
sumfunc = lambda n, l: sum([l[x]*((n>>x)&1... | Traceback (most recent call last):
File "/tmp/tmpsok57jnt/tmp5co73a7r.py", line 3, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s542843230 | p04013 | u786020649 | 1594349814 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 24484 | 758 | from collections import deque
n,a=map(int,input().split())
cards=list(map(int,input().split()))
noz=[x-a for x in cards].count(0)
pl=[x-a for x in cards if x-a>0]
nl=[a-x for x in cards if x-a<0]
sl=[pl,nl][len(nl)<=len(pl)]
ll=[pl,nl][len(pl)<len(nl)]
sl.sort()
ll.sort()
sumfunc = lambda n, l: sum([l[x]*((n>>x)&1... | Traceback (most recent call last):
File "/tmp/tmp3tflrc7z/tmp947_nq1z.py", line 3, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s586679958 | p04013 | u786020649 | 1594344638 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 18568 | 643 | from collections import deque
n,a=map(int,input().split())
cards=list(map(int,input().split()))
noz=[x-a for x in cards].count(0)
pl=[x-a for x in cards if x-a>0]
nl=[a-x for x in cards if x-a<0]
sl=[pl,nl][len(nl)<=len(pl)]
ll=[pl,nl][len(pl)<len(nl)]
sl.sort()
ll.sort()
sumfunc = lambda n, l: sum([l[x]*((n>>x)&1... | Traceback (most recent call last):
File "/tmp/tmpwf6qz6t_/tmpzgzafzjh.py", line 3, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s102200702 | p04013 | u786020649 | 1594341091 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 18416 | 645 | from collections import deque
n,a=map(int,input().split())
cards=list(map(int,input().split()))
noz=[x-a for x in cards].count(0)
pl=[x-a for x in cards if x-a>0]
nl=[a-x for x in cards if x-a<0]
sl=[pl,nl][len(nl)<=len(pl)]
ll=[pl,nl][len(pl)<len(nl)]
sl.sort()
ll.sort()
nsl=len(sl)
nll=len(ll)
sumsl=[sum([sl[x]... | Traceback (most recent call last):
File "/tmp/tmp25kn8wgl/tmpwiak8fzo.py", line 3, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s599348131 | p04013 | u786020649 | 1594340323 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 18588 | 647 | from collections import deque
n,a=map(int,input().split())
cards=list(map(int,input().split()))
noz=[x-a for x in cards].count(0)
pl=[x-a for x in cards if x-a>0]
nl=[a-x for x in cards if x-a<0]
sl=[pl,nl][len(nl)<=len(pl)]
ll=[pl,nl][len(pl)<len(nl)]
sl.sort()
ll.sort()
nsl=len(sl)
nll=len(ll)
sumsl=[sum([sl[x]... | Traceback (most recent call last):
File "/tmp/tmpqub14cje/tmpnmsfr22x.py", line 3, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s067379302 | p04013 | u786020649 | 1594338534 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 18600 | 691 | from collections import deque
n,a=map(int,input().split())
cards=list(map(int,input().split()))
def is2power(n):
if n==1:
return True
if n%1==1:
return False
else:
is2power(n//2)
noz=[x-a for x in cards].count(0)
pl=[x-a for x in cards if x-a>0]
nl=[a-x for x in cards if x-a<0]
s... | Traceback (most recent call last):
File "/tmp/tmp1x0fp70_/tmp542r38oc.py", line 3, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s633721625 | p04013 | u786020649 | 1594338183 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 18260 | 711 | from collections import deque
n,a=map(int,input().split())
cards=list(map(int,input().split()))
def is2power(n):
if n==1:
return True
if n%1==1:
return False
else:
is2power(n//2)
noz=[x-a for x in cards].count(0)
pl=[x-a for x in cards if x-a>0]
nl=[a-x for x in cards if x-a<0]
s... | Traceback (most recent call last):
File "/tmp/tmpb8xj9k8x/tmpr3owymh1.py", line 3, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s626843540 | p04013 | u391589398 | 1594261191 | Python | Python (3.8.2) | py | Runtime Error | 981 | 69196 | 668 | n, a = map(int, input().split())
X = tuple(map(int, input().split()))
dp = [[[0] * (n*max(X)+1) for _ in range(n+1)] for _ in range(n+1)]
dp[0][0][0] = 1
for i in range(n):
# i枚目までで
for j in range(n):
# j枚のカードを選んで
for s in range(n*max(X)+1):
# 合計がsになるパターン
if dp[i][j][s] =... | Traceback (most recent call last):
File "/tmp/tmptfdpr08r/tmpwzd48yqn.py", line 1, in <module>
n, a = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s093729951 | p04013 | u793430793 | 1593294870 | Python | Python (3.8.2) | py | Runtime Error | 2208 | 62408 | 457 | #ABC044C
#重要
N,A=map(int,input().split())
a=list(map(int,input().split()))
dp=[]
dp=[[[0 for k in range(N*A)] for j in range(A+1)]for i in range(N+1)]
dp[0][0][0]=1
for i in range(len(a)):
for j in range(len(a)):
for k in range(N*A):
if k>=a[i]:
dp[i+1][j+1][k]+=dp[i][j][k... | Traceback (most recent call last):
File "/tmp/tmpbd9e757i/tmp80z2igxr.py", line 3, in <module>
N,A=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s476986325 | p04013 | u793430793 | 1593294606 | Python | Python (3.8.2) | py | Runtime Error | 1717 | 306476 | 518 | #ABC044C
#重要
N,A=map(int,input().split())
a=list(map(int,input().split()))
dp=[]
dp=[[[0 for i in range(111)] for j in range(111)]for k in range(N*A)]
dp[0][0][0]=1
for i in range(N):
for j in range(len(a)):
for k in range(N*A):
if k>=a[i]: #i+1番目の数字a[i]を足せるかも
dp[i+1][j+1][... | Traceback (most recent call last):
File "/tmp/tmpw9opy6jg/tmpamucfcgf.py", line 3, in <module>
N,A=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s078700779 | p04013 | u249372595 | 1592774868 | Python | Python (3.8.2) | py | Runtime Error | 430 | 89616 | 482 | N,A=list(map(int,input().split()))
x = list(map(int,input().split()))
dp=[[[0 for _ in range(55)] for _ in range(55)] for _ in range(2555)]
dp[0][0][0]=1
for j in range(N):#x1~xjのカードから
for k in range(N):#k枚選び
for s in range(A*N):#xの合計をsになるようにしたい
if dp[j][k][s] == 0:
continue
dp[j+1][k][s] += d... | Traceback (most recent call last):
File "/tmp/tmpcteseq5t/tmp4d02pqol.py", line 1, in <module>
N,A=list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s158909362 | p04013 | u249372595 | 1592774583 | Python | Python (3.8.2) | py | Runtime Error | 432 | 89668 | 460 | N,A=list(map(int,input().split()))
x = list(map(int,input().split()))
dp=[[[0 for _ in range(55)] for _ in range(55)] for _ in range(2555)]
dp[0][0][0]=1
for j in range(N):#x1~xjのカードから
for k in range(N):#k枚選び
for s in range(A*N):#xの合計をsになるようにしたい
dp[j+1][k][s] += dp[j][k][s]
if s >= x[j]:
dp[j+... | Traceback (most recent call last):
File "/tmp/tmpxrvnklva/tmpem9j2ezz.py", line 1, in <module>
N,A=list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s060642815 | p04013 | u102367647 | 1592400422 | Python | Python (3.4.3) | py | Runtime Error | 307 | 22428 | 1645 | import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache
sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.... | Traceback (most recent call last):
File "/tmp/tmpvsil5ndl/tmp8yyitd_n.py", line 53, in <module>
main()
File "/tmp/tmpvsil5ndl/tmp8yyitd_n.py", line 29, in main
n, a = LI()
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s920431845 | p04013 | u811436126 | 1591419884 | Python | Python (3.4.3) | py | Runtime Error | 2062 | 69524 | 385 | n, a = map(int, input().split())
x = list(map(int, input().split()))
dp = [[[0] * 3000 for _ in range(50)] for _ in range(50)]
dp[0][0][0] = 1
for i in range(n):
for j in range(n):
for k in range(n * a):
dp[i + 1][j][k] += dp[i][j][k]
dp[i + 1][j + 1][k + x[i]] += dp[i][j][k]
ans ... | Traceback (most recent call last):
File "/tmp/tmpf6idjhwo/tmptw37c282.py", line 1, in <module>
n, a = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s565876696 | p04013 | u987170100 | 1591408279 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 273 | N, A = map(int, input().split())
lst = [int(x) - A for x in input().split()]
dp = [[0] * (2 * N + 1) for _ in range(N + 1)]
dp[0][1 * N] = 1
for i in range(N):
for j in range(1, 2 * N + 1 - 1):
dp[i + 1][j] = dp[i][j] + dp[i][j - lst[i]]
print(dp[N][1 * N] - 1) | Traceback (most recent call last):
File "/tmp/tmpz328jzh0/tmputbh0v1m.py", line 1, in <module>
N, A = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s456838979 | p04013 | u987170100 | 1591408255 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3064 | 284 | N, A = map(int, input().split())
lst = [int(x) - A for x in input().split()]
dp = [[0] * (2 * N + 1) for _ in range(N + 1)]
dp[0][1 * N] = 1
for i in range(N):
for j in range(1, 2 * N + 1 - 1):
dp[i + 1][j] = dp[i][j] + dp[i][j - lst[i]]
print(dp[N][1 * N] - 1)
print(dp) | Traceback (most recent call last):
File "/tmp/tmp0l4_7bx1/tmp6ei511_p.py", line 1, in <module>
N, A = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s967561733 | p04013 | u086503932 | 1591059296 | Python | Python (3.4.3) | py | Runtime Error | 2107 | 57460 | 656 | #!/usr/bin/env python3
def main():
N, A = map(int, input().split())
x = list(map(int, input().split()))
X = max(x)
dp = [[[0]*(N*X +1) for _ in range(N+1)] for _ in range(N+1)]
dp[0][0][0] = 1
for j in range(1,N+1):
for k in range(N+1):
for s in range(N*X+1):
... | Traceback (most recent call last):
File "/tmp/tmpp67idlzy/tmpi5b067fi.py", line 23, in <module>
main()
File "/tmp/tmpp67idlzy/tmpi5b067fi.py", line 5, in main
N, A = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s394042000 | p04013 | u225388820 | 1590477166 | Python | PyPy3 (2.4.0) | py | Runtime Error | 402 | 93404 | 508 | n,a=map(int,input().split())
x=list(map(int,input().split()))
# dp[j][k][s]=(x1,...,xjからk枚選んでx[i]の合計をsにするような選び方の総数)
dp=[[[0]*2500 for i in range(51)] for j in range(51)]
dp[0][0][0]=1
for i in range(n):
for j in range(n+1):
for k in range(2500):
if k<x[i]:
dp[i+1][j][k]=dp[i][j][... | Traceback (most recent call last):
File "/tmp/tmp5b9olh8t/tmpwuirhy_g.py", line 1, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s492688158 | p04013 | u054556734 | 1589946327 | Python | Python (3.4.3) | py | Runtime Error | 279 | 20496 | 964 | import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(in... | Traceback (most recent call last):
File "/tmp/tmp1nat5uxv/tmpzgg5x8pe.py", line 19, in <module>
n,a = imap()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s322854469 | p04013 | u054556734 | 1589916808 | Python | Python (3.4.3) | py | Runtime Error | 753 | 15988 | 1003 | import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(in... | Traceback (most recent call last):
File "/tmp/tmpzrt9f12p/tmp4o2v0us9.py", line 19, in <module>
n,a = imap()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s298347476 | p04013 | u054556734 | 1589914801 | Python | Python (3.4.3) | py | Runtime Error | 743 | 15988 | 961 | import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(in... | Traceback (most recent call last):
File "/tmp/tmp3qst_nhd/tmp6cvm82fn.py", line 19, in <module>
n,a = imap()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s217342301 | p04013 | u054556734 | 1589914768 | Python | Python (3.4.3) | py | Runtime Error | 739 | 20668 | 962 | import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(in... | Traceback (most recent call last):
File "/tmp/tmp98liz4zf/tmpzkrj8gdd.py", line 19, in <module>
n,a = imap()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s819566144 | p04013 | u054556734 | 1589914736 | Python | Python (3.4.3) | py | Runtime Error | 935 | 19256 | 981 | import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(in... | Traceback (most recent call last):
File "/tmp/tmp3gszfl_d/tmpy5sypqz1.py", line 19, in <module>
n,a = imap()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s408105487 | p04013 | u054556734 | 1589914692 | Python | Python (3.4.3) | py | Runtime Error | 941 | 18456 | 1005 | import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(in... | Traceback (most recent call last):
File "/tmp/tmpxf2q2tnb/tmpexph0h11.py", line 19, in <module>
n,a = imap()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s937711662 | p04013 | u054556734 | 1589891447 | Python | Python (3.4.3) | py | Runtime Error | 307 | 19400 | 821 | import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
import copy as cp
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(in... | Traceback (most recent call last):
File "/tmp/tmpg2obcej9/tmp7fug7fk4.py", line 19, in <module>
n,a = imap()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s843456675 | p04013 | u835534360 | 1589746941 | Python | Python (3.4.3) | py | Runtime Error | 2109 | 63560 | 440 | import numpy as np
n,avea=tuple(map(lambda x:int(x),input().split()))
x=np.array(list(map(lambda x:int(x),input().split())))
dp=np.zeros((n+1,n+1,max(x)*n+1), dtype=int)
dp[:,0,0]=1
c=0
for i in range(n):
for j in range(i):
for k in range(max(x)*(i+1)):
if k-x[i]>=0:
dp[i+1,j,k]=... | Traceback (most recent call last):
File "/tmp/tmpbf2dzt05/tmpxvzgpp42.py", line 2, in <module>
n,avea=tuple(map(lambda x:int(x),input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s320316782 | p04013 | u867848444 | 1589686695 | Python | PyPy3 (2.4.0) | py | Runtime Error | 319 | 101980 | 803 | n, a = map(int,input().split())
x = list(map(int,input().split()))
dp = [[[0] * n for i in range(n * a + 1)] for i in range(n)]
for i in range(n):
for j in range(n * a + 1):
for k in range(n):
if i == 0 and x[0] < n * a + 1:
dp[0][x[0]][0] = 1
break
e... | Traceback (most recent call last):
File "/tmp/tmp5dbmm1x5/tmpsnfnpv9l.py", line 1, in <module>
n, a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s519067629 | p04013 | u867848444 | 1589686628 | Python | PyPy3 (2.4.0) | py | Runtime Error | 311 | 101852 | 782 | n, a = map(int,input().split())
x = list(map(int,input().split()))
dp = [[[0] * n for i in range(n * a + 1)] for i in range(n)]
for i in range(n):
for j in range(n * a + 1):
for k in range(n):
if i == 0:
dp[0][x[0]][0] = 1
break
else:
... | Traceback (most recent call last):
File "/tmp/tmpl8zr4g8i/tmpz8l7uflr.py", line 1, in <module>
n, a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s676228810 | p04013 | u867848444 | 1589685250 | Python | PyPy3 (2.4.0) | py | Runtime Error | 892 | 124252 | 800 | n, a = map(int,input().split())
x = list(map(int,input().split()))
dp = [[[0] * n for i in range(n * a + 1)] for i in range(n)]
#print(*dp, sep='\n')
for i in range(n):
for j in range(n * a + 1):
for k in range(n):
if i == 0:
dp[0][x[0]][0] = 1
else:
... | Traceback (most recent call last):
File "/tmp/tmpyxzkxhql/tmpkikq4r1n.py", line 1, in <module>
n, a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s952465052 | p04013 | u480300350 | 1589659906 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2112 | 138556 | 4716 | #!/usr/bin/env python3
import sys
# import math
# from string import ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from operator import itemgetter... | Traceback (most recent call last):
File "/tmp/tmpxqqhphvl/tmpl2p04680.py", line 93, in <module>
main()
File "/tmp/tmpxqqhphvl/tmpl2p04680.py", line 65, in main
n, a = mi()
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s490142856 | p04013 | u102126195 | 1588878637 | Python | PyPy3 (2.4.0) | py | Runtime Error | 491 | 98524 | 647 | n, a = map(int, input().split())
x = list(map(int, input().split()))
x = [0] + x
dp = [[[0 for _ in range(max(x)*n+1)] for _ in range(n+1)] for _ in range(n+1)]
x.sort()
for j in range(n+1):
for k in range(n+1):
for s in range(max(x)*n+1):
if j == 0 and k == 0 and s == 0:
dp[j][k... | Traceback (most recent call last):
File "/tmp/tmph_htbj45/tmp64xed8bo.py", line 1, in <module>
n, a = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s875611874 | p04013 | u097317219 | 1588877622 | Python | PyPy3 (2.4.0) | py | Runtime Error | 405 | 92636 | 497 | n,a = map(int,input().split())
x = list(map(int,input().split()))
max_x = max(x)
dp = [[[0]*(n*max_x+1) for i in range(n+1)] for j in range(n+1)]
dp[0][0][0] = 1
for i in range(n+1):
for j in range(n+1):
for k in range(n*max_x+1):
if i>=1 and k < x[i-1]:
dp[i][j][k] = dp[i-1][j][k]
elif i>=1 a... | Traceback (most recent call last):
File "/tmp/tmpwizalkgj/tmphy6v59q3.py", line 1, in <module>
n,a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s195172899 | p04013 | u934868410 | 1588708527 | Python | Python (3.4.3) | py | Runtime Error | 73 | 4980 | 218 | n,a = map(int,input().split())
x = list(map(int,input().split()))
t = [[0]*5001 for _ in range(n+1)]
ans = 0
for i in range(1, n+1):
for y in x:
for z in t[i-1]:
t[i][z+y-a] += 1
ans += t[i][0]
print(ans) | Traceback (most recent call last):
File "/tmp/tmpxl6xfrh9/tmpbk9dcmvw.py", line 1, in <module>
n,a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s760745230 | p04013 | u934868410 | 1588708503 | Python | Python (3.4.3) | py | Runtime Error | 21 | 4980 | 215 | n,a = map(int,input().split())
x = list(map(int,input().split()))
t = [[0]*5001 for _ in range(n+1)]
ans = 0
for i in range(1, n+1):
for y in x:
for z in t[i-1]:
t[z+y-a] += 1
ans += t[i][0]
print(ans) | Traceback (most recent call last):
File "/tmp/tmpw1w7xjir/tmpkpa303zn.py", line 1, in <module>
n,a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s289049759 | p04013 | u614875193 | 1588615992 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1109 | #include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 60;
int MOD = 1000000007;
double PI = 3.14159265358979323846;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0... | File "/tmp/tmp6xue8a3t/tmpyb2yb0t8.py", line 4
const long long INF = 1LL << 60;
^
SyntaxError: invalid decimal literal
| |
s734216641 | p04013 | u106797249 | 1588520069 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 360 | def resolve():
N, A = list(map(int, input().split()))
X = sorted(list(map(int, input().split())))
cnt = 0
for bits in range(1, 1<<N):
flags = list(bin(bits)[2:].zfill(N))
_X = [x for i, x in enumerate(X) if flags[i]=="1"]
cnt += 1 if sum(_X)/len(_X) == A
print(cnt)
if... | File "/tmp/tmplglnyxo0/tmpub_aeo3i.py", line 8
cnt += 1 if sum(_X)/len(_X) == A
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: expected 'else' after 'if' expression
| |
s917901271 | p04013 | u308918401 | 1588449635 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3064 | 476 | n,a=map(int,input().split())
x=list(map(int,input().split()))
t=[[[0]*(n*a+1)]*(n+1)]*(n+1)
ans=0
for j in range(n+1):
for k in range(n+1):
if k>j:
break
for s in range((n+1)*a+1):
if s==0 and k==0 and j==0:
t[j][k][s]=1
elif j>=1 and x[j-1]>s:
t[j][k][s]=t[j-1][k][s]
e... | Traceback (most recent call last):
File "/tmp/tmpawki0jrt/tmp_wpso70i.py", line 1, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s458332743 | p04013 | u308918401 | 1588447031 | Python | Python (3.4.3) | py | Runtime Error | 72 | 12276 | 474 | n,a=map(int,input().split())
x=list(map(int,input().split()))
t=[[[0 for s in range(k*a+1)]for k in range(j+1)]for j in range(n+1)]
for j in range(n+1):
for k in range(j+1):
for s in range(k*a+1):
if s==0 and k==0 and j==0:
t[j][k][s]=0
elif j>=1 and x[j+1]<s:
t[j][k][s]=t[j-1][k][s]
... | Traceback (most recent call last):
File "/tmp/tmpz6_8_3q7/tmp9e_8g7gm.py", line 1, in <module>
n,a=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s266379086 | p04013 | u915647268 | 1587812210 | Python | Python (3.4.3) | py | Runtime Error | 216 | 5108 | 378 | n, a = [int(i) for i in input().split()]
x = [int(i)-a for i in input().split()]
max = max(x)
dp = [[0 for _ in range(2*n*max+1)] for _ in range(n+1)]
dp[0][n*max] = 1
for i in range(1, n+1):
for j in range(2*n*max+1):
if j - x[i-1] < 0 or j - x[i-1] > 2*n*max:
dp[i][j] = dp[i-1][j]
else:
dp[i][j] = d... | Traceback (most recent call last):
File "/tmp/tmpfnowdeyh/tmp8580swoh.py", line 1, in <module>
n, a = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s819337404 | p04013 | u915647268 | 1587811808 | Python | Python (3.4.3) | py | Runtime Error | 194 | 5108 | 566 | n, a = [int(i) for i in input().split()]
x = [int(i)-a for i in input().split()]
max = max(x)
dp = [[0 for _ in range(2*n*max+1)] for _ in range(n+1)]
dp[0][n*max] = 1
for i in range(1, n+1):
for j in range(2*n*max+1):
if j - x[i-1] < 0 or j - x[i-1] > 2*n*max:
dp[i][j] = dp[i-1][j]
else:
dp[i][j] = d... | Traceback (most recent call last):
File "/tmp/tmpzp8bbjh9/tmpfq_0v8hj.py", line 1, in <module>
n, a = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s640040742 | p04013 | u915647268 | 1587810763 | Python | Python (3.4.3) | py | Runtime Error | 195 | 5108 | 577 | n, a = [int(i) for i in input().split()]
x = [int(i)-a for i in input().split()]
max = max(x)
dp = [[0 for _ in range(2*n*max)] for _ in range(n)]
dp[0][n*max+x[0]] = 1
dp[0][n*max] = 1
for i in range(1, n):
for j in range(2*n*max):
if j - x[i] < 0 or j - x[i] >= 2*n*max:
dp[i][j] = dp[i-1][j]
else:
d... | Traceback (most recent call last):
File "/tmp/tmp6erg1vx7/tmp97ga2hc2.py", line 1, in <module>
n, a = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s445335537 | p04013 | u622045059 | 1587320520 | Python | Python (3.4.3) | py | Runtime Error | 2107 | 58920 | 2583 | # python3.4.2用
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from decimal import *
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
INF = float('inf') #無限大
def gcd(a,b):return fractions.gcd(a,b) #最大公約数
def lcm(a,b... | Traceback (most recent call last):
File "/tmp/tmp67yna3za/tmpbr9waxmb.py", line 45, in <module>
N,A=imn()
^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s597504873 | p04013 | u423665486 | 1587252362 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 362 | def resolve():
modu = 1000000007
n, m = map(int, input().split())
a = [False]*n
for _ in range(m):
a[int(input())] = True
dp = [0]*(n+1)
dp[0], dp[1] = 1, 1
for i in range(2, n+1):
if a[i]:
continue
multi = []
if not a[i-1]:
multi.append(dp[i-1])
if not a[i-2]:
multi.append(dp[i-2])
dp[i] = ... | Traceback (most recent call last):
File "/tmp/tmpr3u1p93f/tmpa7qv4t0l.py", line 19, in <module>
resolve()
File "/tmp/tmpr3u1p93f/tmpa7qv4t0l.py", line 3, in resolve
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s433071657 | p04013 | u114233208 | 1586745315 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 4188 | 967 |
import math
def nCr(n,r):
f = math.factorial
return f(n) / f(r) / f(n-r)
N, A = list(map(int, input().split()))
X = sorted(list(map(int, input().split())))
numbers = [0 for i in range((N*A)+1)]
for each in X:
numbers[each] += 1
g = numbers.copy()
def ways(a, k, arr, g):
global numbers
f = g.copy(... | Traceback (most recent call last):
File "/tmp/tmp6c2_g_l9/tmpy0zwhho3.py", line 8, in <module>
N, A = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s048703228 | p04013 | u254871849 | 1586715129 | Python | Python (3.4.3) | py | Runtime Error | 291 | 21484 | 431 | import sys
import numpy as np
n, a, *x = map(int, sys.stdin.read().split())
def main():
m = max(n, a) * max(x)
dp = np.zeros((n + 1, m + 1), dtype=np.int64)
dp[0, 0] = 1
for i in range(n):
ndp = np.copy(dp)
for j in range(1, n + 1):
ndp[j][x[i]:] += dp[j-1][:m-x[i]+1]
... | Traceback (most recent call last):
File "/tmp/tmpvtqk42wa/tmpg1x7bukf.py", line 4, in <module>
n, a, *x = map(int, sys.stdin.read().split())
^^^^^^^^
ValueError: not enough values to unpack (expected at least 2, got 0)
| |
s332872127 | p04013 | u426572476 | 1586672212 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3192 | 3409 | import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt
from functools import lru_cache, reduce
INF = 1 << 60
mod = 1000000007
sys.setrecursionlimit(10 ** 7)
# Uni... | File "/tmp/tmp0l32k_3m/tmpo9peuvhe.py", line 126
for i in range(n):
^
IndentationError: expected an indented block after 'else' statement on line 125
| |
s214543673 | p04013 | u411203878 | 1586630548 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38896 | 671 | import math
import collections
def comb(n, k):
return math.factorial(n) // math.factorial(k) // math.factorial(n - k)
n,a = map(int,input().split())
t = list(map(int,input().split()))
memo = [0]*51
for i in t:
memo[i] += 1
typecount = []
ans = 0
for i in t:
if i != a:
typecount.append(i)
fo... | Traceback (most recent call last):
File "/tmp/tmpv2902hov/tmpk_y5hbt9.py", line 7, in <module>
n,a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s361954215 | p04013 | u411203878 | 1586630307 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3316 | 685 | import math
def combination(n, k):
return math.factorial(n) // math.factorial(k) // math.factorial(n - k)
import collections
n,a = map(int,input().split())
t = list(map(int,input().split()))
memo = [0]*51
for i in t:
memo[i] += 1
typecount = []
ans = 0
for i in t:
if i != a:
typecount.append... | Traceback (most recent call last):
File "/tmp/tmp3vyiw94o/tmp00da50pa.py", line 7, in <module>
n,a = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.