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
s166708330
p02271
u619765879
1452963237
Python
Python
py
Runtime Error
0
0
497
def solve(i, m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = 1 elif i >= n: dp[i][m] = 0 elif solve(i+1, m): dp[i][m] = 1 elif solve(i+1, m-A[i]): dp[i][m] = 1 else: dp[i][m] = 0 return dp[i][m] n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) dp = [[]*p]*n for i in range(n): for m in range(p): dp[i][m] == -1 for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmpx3ect_w4/tmp2ae3dkm4.py", line 33 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s188005658
p02271
u619765879
1452963339
Python
Python
py
Runtime Error
0
0
477
def solve(i, m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = 1 elif i >= n: dp[i][m] = 0 elif solve(i+1, m): dp[i][m] = 1 elif solve(i+1, m-A[i]): dp[i][m] = 1 else: dp[i][m] = 0 return dp[i][m] n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) dp = = [[-1 for col in range(p)] for row in range(n)] for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmp9uugga7v/tmpc9fzbvwg.py", line 25 dp = = [[-1 for col in range(p)] for row in range(n)] ^ SyntaxError: invalid syntax
s090507529
p02271
u619765879
1452963354
Python
Python
py
Runtime Error
0
0
475
def solve(i, m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = 1 elif i >= n: dp[i][m] = 0 elif solve(i+1, m): dp[i][m] = 1 elif solve(i+1, m-A[i]): dp[i][m] = 1 else: dp[i][m] = 0 return dp[i][m] n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) dp = [[-1 for col in range(p)] for row in range(n)] for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmpgwtd5yw6/tmpcru8jcji.py", line 29 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s368126280
p02271
u619765879
1452963491
Python
Python
py
Runtime Error
0
0
478
def solve(i, m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = 1 elif i >= n: dp[i][m] = 0 elif solve(i+1, m): dp[i][m] = 1 elif solve(i+1, m-A[i]): dp[i][m] = 1 else: dp[i][m] = 0 return dp[i][m] n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) dp = [[-1 for col in range(2000)] for row in range(n)] for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmpvef3gp21/tmpl_mnbp73.py", line 29 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s342682942
p02271
u619765879
1452963624
Python
Python
py
Runtime Error
0
0
478
def solve(i, m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = 1 elif i >= n: dp[i][m] = 0 elif solve(i+1, m): dp[i][m] = 1 elif solve(i+1, m-A[i]): dp[i][m] = 1 else: dp[i][m] = 0 return dp[i][m] n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) dp = [[-1 for col in range(n)] for row in range(2000)] for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmpfi8isqzn/tmp5kbrx0z4.py", line 29 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s247629775
p02271
u619765879
1452964007
Python
Python
py
Runtime Error
0
0
478
def solve(i, m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = 1 elif i >= n: dp[i][m] = 0 elif solve(i+1, m): dp[i][m] = 1 elif solve(i+1, m-A[i]): dp[i][m] = 1 else: dp[i][m] = 0 return dp[i][m] n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) dp = [[-1 for col in range(2000)] for row in range(n)] for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmplh2awkjd/tmpgrv5z9oz.py", line 29 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s061412232
p02271
u834416077
1453006431
Python
Python
py
Runtime Error
0
0
337
n = int(raw_input()) A = map(int,raw_input().split()) q = int(raw_input()) m = map(int,raw_input().split()) def solve(i,m): if m == 0: return 1 if i >= n or m - sum(A) > 0: return 0 res = solve(i+1,m) or solve(i+1,m-A[i]) return res for j in range(q): if solve(0,m[j]): print "yes" else: print "no"
File "/tmp/tmpdj05gmsh/tmpsvq06qby.py", line 12 return res IndentationError: unexpected indent
s093415500
p02271
u834416077
1453006490
Python
Python
py
Runtime Error
0
0
334
n = int(raw_input()) A = map(int,raw_input().split()) q = int(raw_input()) m = map(int,raw_input().split()) def solve(i,m): if m == 0: return 1 if i >= n or m - sum(A) > 0: return 0 res = solve(i+1,m) or solve(i+1,m-A[i]) return res for j in range(q): if solve(0,m[j]): print "yes" else: print "no"
File "/tmp/tmppdbaveua/tmpwhsu6mkf.py", line 12 return res IndentationError: unexpected indent
s100013705
p02271
u834416077
1453006719
Python
Python
py
Runtime Error
0
0
367
n = int(raw_input()) A = map(int,raw_input().split()) q = int(raw_input()) m = map(int,raw_input().split()) def solve(i,m): if m == 0: return 1 if i >= n or m - sum(A) > 0: return 0 res = solve(i+1,m) or solve(i+1,m-A[i]) return res for j in range(q): if solve(0,m[j]): print "yes" else: print "no"
File "/tmp/tmp_b6xqyhz/tmpsyh4iblc.py", line 12 return res IndentationError: unexpected indent
s603468052
p02271
u119456964
1453009149
Python
Python
py
Runtime Error
0
0
376
n = int(raw_input()) A = map(int, raw_input().split()) q = int(raw_input()) m = map(int, raw_input().split()) def solve(i, m): if m == 0: return 1 if i > n or m > sum(A): return 0 res = solve(i + 1, m) or solve(i + 1, m - A[i]) return res for j in range(0, q): if solve(0, m[j]): print "yes" else: print "no"
File "/tmp/tmp_wsu8erl/tmpa80_rkm0.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s570919930
p02271
u663227983
1453012694
Python
Python
py
Runtime Error
0
0
619
# coding: utf-8 # Here your code ! for i in xrange(50): for j in xrange(50): dp[i][j] = 0 def solve(i,m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = True elif i >= n: dp[i][m] = False elif solve(i+1, m): dp[i][m] = True elif solve(i+1, m-a[i]): dp[i][m] = True else: dp[i][m] = False return dp[i][m] n = input() a = map(int,raw_input().split()) q = input() p = map(int,raw_input().split()) dp =[[-1]*1000]*1000 for i in xrange(0,q): if solve(0,p[i]): print "yes" else: print "no"
File "/tmp/tmpamoffkzk/tmpew3x3hm4.py", line 33 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s788280842
p02271
u663227983
1453012706
Python
Python
py
Runtime Error
0
0
619
# coding: utf-8 # Here your code ! for i in xrange(50): for j in xrange(50): dp[i][j] = 0 def solve(i,m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = True elif i >= n: dp[i][m] = False elif solve(i+1, m): dp[i][m] = True elif solve(i+1, m-a[i]): dp[i][m] = True else: dp[i][m] = False return dp[i][m] n = input() a = map(int,raw_input().split()) q = input() p = map(int,raw_input().split()) dp =[[-1]*1000]*1000 for i in xrange(0,q): if solve(0,p[i]): print "yes" else: print "no"
File "/tmp/tmpduf7sucq/tmpdms0tjzl.py", line 33 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s983354931
p02271
u663227983
1453015673
Python
Python
py
Runtime Error
10
6372
488
def solve(i, m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = 1 elif i >= n: dp[i][m] = 0 elif solve(i+1, m): dp[i][m] = 1 elif solve(i+1, m-A[i]): dp[i][m] = 1 else: dp[i][m] = 0 return dp[i][m] n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) dp = [[-1 for i in range(max(m)+1)] for j in range(n+1)] for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmpkx8pxdmt/tmpz84k_r2l.py", line 30 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s947921523
p02271
u663227983
1453015721
Python
Python
py
Runtime Error
10
6356
559
def solve(i,m): if dp[i][m] != -1: return dp[i][m] if m == 0: dp[i][m] = True elif i >= n: dp[i][m] = False elif solve(i+1, m): dp[i][m] = True elif solve(i+1, m-a[i]): dp[i][m] = True else: dp[i][m] = False return dp[i][m] n = input() a = map(int,raw_input().split()) q = input() p = map(int,raw_input().split()) dp = [[-1 for i in xrange(max(p)+1)] for j in xrange(n+1)] for i in xrange(q): if solve(0,p[i]): print "yes" else: print "no"
File "/tmp/tmpld52wrof/tmp6azywmy0.py", line 25 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s676582881
p02271
u824204304
1453024420
Python
Python
py
Runtime Error
0
0
347
n = int(raw_input()) A = map(int, raw_input().split()) q = int(raw_input()) M = map(int, raw_input().split()) def solve(i,m): if m == 0: return True if i >= n or m - sum(A) > 0: return False res = solve(i+1,m) or solve(i+1, m-A[i] return res for j in range(q): if solve(0,m[j]): print "yes" else: print "no"
File "/tmp/tmpato7iveu/tmp2kikqfz1.py", line 11 res = solve(i+1,m) or solve(i+1, m-A[i] ^ SyntaxError: '(' was never closed
s672584425
p02271
u824204304
1453024483
Python
Python
py
Runtime Error
0
0
347
n = int(raw_input()) A = map(int, raw_input().split()) q = int(raw_input()) M = map(int, raw_input().split()) def solve(i,m): if m == 0: return True if i >= n or m - sum(A) > 0: return False res = solve(i+1,m) or solve(i+1, m-A[i] return res for j in range(q): if solve(0,M[j]): print "yes" else: print "no"
File "/tmp/tmpotkw_tuv/tmpgr2icji8.py", line 11 res = solve(i+1,m) or solve(i+1, m-A[i] ^ SyntaxError: '(' was never closed
s397089241
p02271
u630265299
1453185661
Python
Python
py
Runtime Error
0
0
291
n = input() for i in range(n): A = map(int, raw_input().split()) j = 2000 while 0 < j: if(j + A < 2000 && f[j + 1] == 1): f[j + A + 1] == 1 j- = 1 Q = input() for i in range(Q) m = map(int, raw_input().split()) if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmpsgp0rucn/tmptxrmpvus.py", line 6 if(j + A < 2000 && f[j + 1] == 1): ^ SyntaxError: invalid syntax
s844820143
p02271
u630265299
1453185819
Python
Python
py
Runtime Error
0
0
325
n = input() f = [for i in range(2000)] = [1] for i in range(n): A = map(int, raw_input().split()) j = 2000 while 0 < j: if(j + A < 2000 && f[j + 1] == 1): f[j + A + 1] == 1 j- = 1 Q = input() for i in range(Q) m = map(int, raw_input().split()) if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmpo9y03hd5/tmp3mpr1me4.py", line 2 f = [for i in range(2000)] = [1] ^^^ SyntaxError: invalid syntax
s598658938
p02271
u630265299
1453186020
Python
Python
py
Runtime Error
0
0
331
n = input() f = [for i in range(n)] f = 0 f[1] = 1 for i in range(n): A = map(int, raw_input().split()) j = 2000 while 0 < j: if(j + A < 2000 && f[j + 1] == 1): f[j + A + 1] == 1 j- = 1 Q = input() for i in range(Q) m = map(int, raw_input().split()) if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmpyb634jzv/tmpobtaamru.py", line 2 f = [for i in range(n)] ^^^ SyntaxError: invalid syntax
s555678799
p02271
u630265299
1453186129
Python
Python
py
Runtime Error
0
0
335
n = input() f = [for i in range(2000)] f = [] f[1] = 1 for i in range(n): A = map(int, raw_input().split()) j = 2000 while 0 < j: if(j + A < 2000 && f[j + 1] == 1): f[j + A + 1] == 1 j- = 1 Q = input() for i in range(Q) m = map(int, raw_input().split()) if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmpjggt28lp/tmp0crk4nnq.py", line 2 f = [for i in range(2000)] ^^^ SyntaxError: invalid syntax
s917017384
p02271
u630265299
1453186299
Python
Python
py
Runtime Error
0
0
335
n = input() A = map(int, raw_input().split()) Q = input() f = [for i in range(2000)] f = [] f[1] = 1 m = map(int, raw_input().split()) for i in range(n): j = 2000 while 0 < j: if(j + A < 2000 && f[j + 1] == 1): f[j + A + 1] == 1 j- = 1 for i in range(Q) if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmp7iw0mnr1/tmp9tuqdu8x.py", line 4 f = [for i in range(2000)] ^^^ SyntaxError: invalid syntax
s651703049
p02271
u630265299
1453186443
Python
Python
py
Runtime Error
0
0
309
n = input() A = map(int, raw_input().split()) Q = input() f = {0} f[1] = 1 m = map(int, raw_input().split()) for i in range(n): j = 2000 while 0 < j: if(j + A < 2000 && f[j + 1] == 1): f[j + A + 1] == 1 j- = 1 for i in range(Q) if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmp6ofx7i86/tmpdcjn6960.py", line 10 while 0 < j: ^ IndentationError: unindent does not match any outer indentation level
s957779977
p02271
u630265299
1453186560
Python
Python
py
Runtime Error
0
0
293
n = input() A = map(int, raw_input().split()) Q = input() m = map(int, raw_input().split()) f = [] for i in range(n): j = 2000 while 0 < j: if(j + A < 2000 && f[j] == 1): f[j + A] == 1 j- = 1 for i in range(Q) if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmpqhn3vz23/tmpbqbbunh3.py", line 11 while 0 < j: ^ IndentationError: unindent does not match any outer indentation level
s046278534
p02271
u630265299
1453186665
Python
Python
py
Runtime Error
0
0
294
n = input() A = map(int, raw_input().split()) Q = input() m = map(int, raw_input().split()) f = [] for i in range(n): j = 2000 for j in range(2000): if(j + A < 2000 && f[j] == 1): f[j + A] == 1 for i in range(Q): if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmpor_2yx8i/tmp8wt1vkp0.py", line 11 for j in range(2000): ^ IndentationError: unindent does not match any outer indentation level
s336912034
p02271
u630265299
1453186695
Python
Python
py
Runtime Error
0
0
303
n = input() A = map(int, raw_input().split()) Q = input() m = map(int, raw_input().split()) f = [] f[0] = 1 for i in range(n): j = 2000 for j in range(2000): if(j + A < 2000 && f[j] == 1): f[j + A] == 1 for i in range(Q): if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmprjmasndg/tmpg81sd78b.py", line 12 for j in range(2000): ^ IndentationError: unindent does not match any outer indentation level
s818881278
p02271
u630265299
1453186740
Python
Python
py
Runtime Error
0
0
290
n = input() A = map(int, raw_input().split()) Q = input() m = map(int, raw_input().split()) f = [] f[0] = 1 for i in range(n): for j in range(2000): if(j + A < 2000 && f[j] == 1): f[j + A] == 1 for i in range(Q): if(f[m] == 1): print "yes" else: print "no"
File "/tmp/tmpxxr2zbjf/tmpqsjs0sw6.py", line 12 if(j + A < 2000 && f[j] == 1): ^ SyntaxError: invalid syntax
s950853331
p02271
u630265299
1453186974
Python
Python
py
Runtime Error
0
0
300
n = input() A = map(int, raw_input().split()) Q = input() m = map(int, raw_input().split()) f = [] f[1] = 1 for i in range(n): for j in range(2000): if(j + A < 2000 && f[j] == 1): f[j + A] == 1 for i in range(Q): if(f[m - 1] == 1): print "yes" else: print "no"
File "/tmp/tmp7wefhziq/tmp92mhp583.py", line 12 if(j + A < 2000 && f[j] == 1): ^ SyntaxError: invalid syntax
s907735989
p02271
u532962080
1453187092
Python
Python
py
Runtime Error
0
0
185
n=raw_input() i=map(raw_input.split()) q=raw_input() m=map(raw_input.split()) if m == 0 return true if i >= n return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res
File "/tmp/tmpetl4fwn8/tmpnt51dptp.py", line 5 if m == 0 ^ SyntaxError: expected ':'
s121460106
p02271
u630265299
1453187250
Python
Python
py
Runtime Error
0
0
274
n = input() f = [] f[1] = 1 for i in range(n): A[i] = input() for j in range(2000): if(j + A[i] < 2000 && f[j] == 1): f[j + A[i]] == 1 Q = input() for i in range(Q): B[i] = input() if(f[B[i] - 1] == 1): print "yes" else: print "no"
File "/tmp/tmpztlv4qk_/tmpmvl5ja04.py", line 9 if(j + A[i] < 2000 && f[j] == 1): ^ SyntaxError: invalid syntax
s097732568
p02271
u532962080
1453189232
Python
Python
py
Runtime Error
0
0
295
n=raw_input() A=map(raw_input.split()) q=raw_input() m=map(raw_input.split()) def solve(i, m) if m == 0: return true if i >= n: return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res for i range(0,q): if solve(0,m[i])==1: return yes else: return no
File "/tmp/tmpx00nl2p5/tmpkmaebgrd.py", line 6 def solve(i, m) ^ SyntaxError: expected ':'
s097269365
p02271
u532962080
1453189257
Python
Python
py
Runtime Error
0
0
293
n=raw_input() A=map(raw_input.split()) q=raw_input() m=map(raw_input.split()) def solve(i, m) if m == 0: return true if i >= n: return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res for i range(0,q): if solve(0,m[i])==1: print yes else: print no
File "/tmp/tmp0t3u3401/tmp0nx7b38m.py", line 6 def solve(i, m) ^ SyntaxError: expected ':'
s858699410
p02271
u532962080
1453189317
Python
Python
py
Runtime Error
0
0
305
n=raw_input() A=map(raw_input.split()) q=raw_input() m=map(raw_input.split()) def solve(i, m) if m == 0: return true if i >= n or sum(A)<m: return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res for i range(0,q): if solve(0,m[i])==1: print yes else: print no
File "/tmp/tmpto55ct1w/tmpq3vw_ck3.py", line 6 def solve(i, m) ^ SyntaxError: expected ':'
s313010493
p02271
u532962080
1453189367
Python
Python
py
Runtime Error
0
0
313
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(i, m) if m == 0: return true if i >= n or sum(A)<m: return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res for i range(0,q): if solve(0,m[i])==1: print yes else: print no
File "/tmp/tmpmegko7rq/tmpuymaypqg.py", line 6 def solve(i, m) ^ SyntaxError: expected ':'
s962794105
p02271
u532962080
1453189426
Python
Python
py
Runtime Error
0
0
313
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(c, m) if m == 0: return true if c >= n or sum(A)<m: return false res = solve(c + 1, m) || solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i])==1: print yes else: print no
File "/tmp/tmp5hxijhqc/tmpm113yodt.py", line 6 def solve(c, m) ^ SyntaxError: expected ':'
s067379049
p02271
u532962080
1453189460
Python
Python
py
Runtime Error
0
0
306
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(c, m) if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) || solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i])==1: print yes else: print no
File "/tmp/tmpzhp0q7x9/tmpgd22g3o8.py", line 6 def solve(c, m) ^ SyntaxError: expected ':'
s252398908
p02271
u532962080
1453189482
Python
Python
py
Runtime Error
0
0
307
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) || solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i])==1: print yes else: print no
File "/tmp/tmp1p_mk9_w/tmpkmbnyglm.py", line 11 res = solve(c + 1, m) || solve(c + 1, m - A[c]) ^ SyntaxError: invalid syntax
s031629202
p02271
u532962080
1453189523
Python
Python
py
Runtime Error
0
0
307
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i])==1: print yes else: print no
File "/tmp/tmp5w_ky5ri/tmpj6xa7zb4.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s401714413
p02271
u532962080
1453189565
Python
Python
py
Runtime Error
0
0
304
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i]): print yes else: print no
File "/tmp/tmp_ey4r0i7/tmp9sox7w8s.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s636752730
p02271
u532962080
1453189587
Python
Python
py
Runtime Error
0
0
311
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i])==1: print 'yes' else: print 'no'
File "/tmp/tmpklky1j5v/tmpehj64ond.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s722669100
p02271
u532962080
1453189600
Python
Python
py
Runtime Error
0
0
308
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i]): print 'yes' else: print 'no'
File "/tmp/tmpaht6uwt3/tmpfntzms3p.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s299086519
p02271
u532962080
1453189613
Python
Python
py
Runtime Error
0
0
308
n=raw_input() A=map(int,raw_input.split()) q=raw_input() m=map(int,raw_input.split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i]): print "yes" else: print "no"
File "/tmp/tmp8dl3srpa/tmp0y_oyn1n.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s085548595
p02271
u532962080
1453189782
Python
Python
py
Runtime Error
0
0
312
n=raw_input() A=map(int,raw_input().split()) q=raw_input() m=map(int,raw_input().split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i]): print "yes" else: print "no"
File "/tmp/tmpbqshchqv/tmpctzzgbjs.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s923936549
p02271
u532962080
1453189801
Python
Python
py
Runtime Error
0
0
314
n=raw_input() A=map(int, raw_input().split()) q=raw_input() m=map(int, raw_input().split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i]): print "yes" else: print "no"
File "/tmp/tmphnpah5ic/tmpt6p0arvu.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s593994381
p02271
u532962080
1453189959
Python
Python
py
Runtime Error
0
0
321
n=(raw_input()) A=map(int, raw_input().split()) q=(raw_input()) m=map(int, raw_input().split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i])==1: print "yes" else: print "no"
File "/tmp/tmp3y2ahu1b/tmphm6iwcdm.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s495151751
p02271
u532962080
1453190050
Python
Python
py
Runtime Error
0
0
327
n=int(raw_input()) A=map(int, raw_input().split()) q=int(raw_input()) m=map(int, raw_input().split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i])==1: print "yes" else: print "no"
File "/tmp/tmpqmhblbms/tmpi8bpsum0.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s467441775
p02271
u532962080
1453190339
Python
Python
py
Runtime Error
0
0
324
n=int(raw_input()) A=map(int, raw_input().split()) q=int(raw_input()) m=map(int, raw_input().split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0,m[i]): print "yes" else: print "no"
File "/tmp/tmpn0sr88pb/tmp1u6xpxbl.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s729976669
p02271
u532962080
1453190376
Python
Python
py
Runtime Error
0
0
325
n=int(raw_input()) A=map(int, raw_input().split()) q=int(raw_input()) m=map(int, raw_input().split()) def solve(c, m): if m == 0: return 1 if c >= n or sum(A)<m: return 0 res = solve(c + 1, m) or solve(c + 1, m - A[c]) return res for i range(0,q): if solve(0, m[i]): print "yes" else: print "no"
File "/tmp/tmptwcr7cht/tmp7f6nt4cf.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s370638728
p02271
u532962080
1453190758
Python
Python
py
Runtime Error
0
0
324
n=int(raw_input()) A=map(int, raw_input().split()) q=int(raw_input()) m=map(int, raw_input().split()) def solve(j, m): if m == 0: return 1 if j >= n or sum(A)<m: return 0 res = solve(j + 1, m) or solve(j + 1, m - A[j]) return res for i range(0,q): if solve(0,m[i]): print "yes" else: print "no"
File "/tmp/tmpsrp8nz1k/tmpu07ymblf.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s255428535
p02271
u532962080
1453190838
Python
Python
py
Runtime Error
0
0
324
n=int(raw_input()) A=map(int, raw_input().split()) q=int(raw_input()) m=map(int, raw_input().split()) def solve(j, m): if m == 0: return 1 if j >= n or m>sum(A): return 0 res = solve(j + 1, m) or solve(j + 1, m - A[j]) return res for i range(0,q): if solve(0,m[i]): print "yes" else: print "no"
File "/tmp/tmpv496wegx/tmptnq_zlg1.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s537095851
p02271
u532962080
1453190940
Python
Python
py
Runtime Error
0
0
326
n=int(raw_input()) A=map(int, raw_input().split()) q=int(raw_input()) m=map(int, raw_input().split()) def solve(j, m): if m == 0: return 1 if j >= n or m > sum(A): return 0 res = solve(j + 1, m) or solve(j + 1, m - A[j]) return res for i range(0,q): if solve(0,m[i]): print "yes" else: print "no"
File "/tmp/tmpmgggt5j5/tmpgwyroemw.py", line 14 for i range(0,q): ^^^^^ SyntaxError: invalid syntax
s940732762
p02271
u233232390
1453194039
Python
Python
py
Runtime Error
0
0
284
n,q = raw_input() A,m = map(int, raw_input().split()) def ans(i, m): if m == 0: return True if i >= n or m > sum(A): return False res = solve(i + 1, m) or solve(i + 1, m - A[i]) return res for m in M: if solve(0,m): print "yes" else: print "no"
File "/tmp/tmpcdu60m7r/tmpm1we6455.py", line 14 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s400858837
p02271
u233232390
1453194330
Python
Python
py
Runtime Error
0
0
479
def ans(n, AA, x): tmp = n + AA[0] if len(AA) == 1: try: x[tmp] = 1 except: pass else: f3(n, AA[1:], x) try: x[tmp] = 1 f3(tmp, AA[1:],x) except: pass return n = raw_input() A = map(int, raw_input().split()) q = raw_input() M = map(int, raw_input().split()) x = [0 for i in range(max(M)+1)] f3(0, A, x) for e in M: if x[e] == 1: print 'yes' else: print 'no'
File "/tmp/tmpr5hp5wvv/tmpsu_w5fre.py", line 25 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s154169406
p02271
u233232390
1453194364
Python
Python
py
Runtime Error
0
0
481
def ans(n, AA, x): tmp = n + AA[0] if len(AA) == 1: try: x[tmp] = 1 except: pass else: ans(n, AA[1:], x) try: x[tmp] = 1 ans(tmp, AA[1:],x) except: pass return n = raw_input() A = map(int, raw_input().split()) q = raw_input() M = map(int, raw_input().split()) x = [0 for i in range(max(M)+1)] f3(0, A, x) for e in M: if x[e] == 1: print 'yes' else: print 'no'
File "/tmp/tmpq3zndh8w/tmp1cq2gbcb.py", line 25 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s426272292
p02271
u047737909
1453204766
Python
Python
py
Runtime Error
0
0
328
n = int(input()) a = map(int,input().split()) p = int(input()) m = map(int,input().split()) def goukei(i,m): if m ==0: return True if i >= n or m > sum(a): return False r = goukei(i + 1, m) or goukei(i + 1, m - a[i]) return r for u in range(answer): if s(0, m[u]): print "yes" else: print "no"
File "/tmp/tmpamkrgcx6/tmpquazs3ml.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s298741082
p02271
u047737909
1453205116
Python
Python
py
Runtime Error
0
0
336
n = int(input()) a = map(int,raw_input().split()) p = int(input()) m = map(int,raw_input().split()) def goukei(i,m): if m ==0: return True if i >= n or m > sum(a): return False r = goukei(i + 1, m) or goukei(i + 1, m - a[i]) return r for u in range(answer): if s(0, m[u]): print "yes" else: print "no"
File "/tmp/tmpbvzszkf0/tmp_trjwynu.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s369519974
p02271
u047737909
1453205175
Python
Python
py
Runtime Error
0
0
354
n = int(input()) a = map(int,raw_input().split()) p = int(input()) m = map(int,raw_input().split()) def goukei(i,m): if m ==0: return True if i >= n or m > sum(a): return False r = goukei(i + 1, m) or goukei(i + 1, m - a[i]) return r for u in range(0,p): if s(0, m[u]): print "yes" else: print "no"
File "/tmp/tmpfyuer2c1/tmpg3w3tsqi.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s930549459
p02271
u563876281
1453205219
Python
Python
py
Runtime Error
0
0
391
n = int(raw_input()) A = map(int, raw_input().strip().split(' ')) q = int(raw_input()) M = map(int, raw_input().strip().split(' ')) def ans(i, m): if m == 0: return 1 if i >= n or m > sum(A): return 0 res = ans(i + 1, m) or ans(i + 1, m - A[i]) return res for j in range(0, q): if ans(0, m[j]): print "yes" else: print"no"
File "/tmp/tmpla5y5_9k/tmpod9y2ilo.py", line 15 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s026173437
p02271
u563876281
1453205235
Python
Python
py
Runtime Error
0
0
392
n = int(raw_input()) A = map(int, raw_input().strip().split(' ')) q = int(raw_input()) M = map(int, raw_input().strip().split(' ')) def ans(i, m): if m == 0: return 1 if i >= n or m > sum(A): return 0 res = ans(i + 1, m) or ans(i + 1, m - A[i]) return res for j in range(0, q): if ans(0, m[j]): print "yes" else: print"no"
File "/tmp/tmp_nw9ivbi/tmp91jrt_rv.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s346885138
p02271
u563876281
1453205276
Python
Python
py
Runtime Error
0
0
392
n = int(raw_input()) A = map(int, raw_input().strip().split(' ')) q = int(raw_input()) M = map(int, raw_input().strip().split(' ')) def ans(i, m): if m == 0: return 1 if i >= n or m > sum(A): return 0 res = ans(i + 1, M) or ans(i + 1, M - A[i]) return res for j in range(0, q): if ans(0, M[j]): print "yes" else: print"no"
File "/tmp/tmp97jnjf76/tmp1p2je962.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s766728259
p02271
u563876281
1453205290
Python
Python
py
Runtime Error
0
0
392
n = int(raw_input()) A = map(int, raw_input().strip().split(' ')) q = int(raw_input()) M = map(int, raw_input().strip().split(' ')) def ans(i, M): if M == 0: return 1 if i >= n or m > sum(A): return 0 res = ans(i + 1, M) or ans(i + 1, M - A[i]) return res for j in range(0, q): if ans(0, M[j]): print "yes" else: print"no"
File "/tmp/tmp3aeusfaf/tmpvyqud7aa.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s097248535
p02271
u177808190
1453214217
Python
Python
py
Runtime Error
0
0
336
num_n = raw_input() ele_n = raw_input() num_m = raw_input() ele_m = raw_input() n = ele_n.split() m = ele_m.split() def solve(i, t): if t == 0: return 1 if i >= num_n: return 0 res = solve(i + 1, t) or solve(i + 1,t - n[i]) return res for t in m: if solve(0,m): print "yes" else: print "no"
File "/tmp/tmpldc78sni/tmp3z6oennx.py", line 19 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s840617636
p02271
u682357930
1453214479
Python
Python
py
Runtime Error
0
0
354
n = input() A = [input() for i in range(n)] q = input() m = [input() for i in range(q)] i = 0 j = 0 def solve(i,m): if m == 0: return True if i >= n: return False res = solve(i+1,m) or solve(i+1, m - A[i]) return res while(i < q): while(j < n): if solve(n, m[q]): print 'yes' else: print 'no' n = n+1 m = m+1
File "/tmp/tmp55a_uo21/tmpe8v6tz2o.py", line 19 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s622538677
p02271
u177808190
1453214623
Python
Python
py
Runtime Error
0
0
357
num_n = raw_input() ele_n = raw_input() num_m = raw_input() ele_m = raw_input() n = int(ele_n.split()) m = int(ele_m.split()) def solve(i, t): if t == 0: return True if i >= num_n: return False res = solve(i + 1, t) or solve(i + 1,t - n[i]) return res for t in m: if solve(0, t): print "yes" else: print "no"
File "/tmp/tmp13f3ufu8/tmp1zdlprx4.py", line 19 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s189224277
p02271
u682357930
1453214657
Python
Python
py
Runtime Error
0
0
353
n = input() A = [input() for i in range(n)] q = input() m = [input() for i in range(q)] i = 0 j = 0 def solve(i,m): if m == 0: return True if i >= n: return False res = solve(i+1,m) | solve(i+1, m - A[i]) return res while(i < q): while(j < n): if solve(n, m[q]): print 'yes' else: print 'no' n = n+1 m = m+1
File "/tmp/tmplm1t02h8/tmp4e2u51qu.py", line 19 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s387621615
p02271
u682357930
1453214729
Python
Python
py
Runtime Error
0
0
310
n = input() A = [input() for i in range(n)] q = input() m = [input() for i in range(q)] i = 0 j = 0 def solve(i,m): if m == 0: return True if i >= n: return False res = solve(i+1,m) | solve(i+1, m - A[i]) return res for m in q: if solve(0, m): print 'yes' else: print 'no'
File "/tmp/tmpp1fufg_z/tmpibsujknz.py", line 18 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s186649002
p02271
u682357930
1453214761
Python
Python
py
Runtime Error
0
0
317
n = input() A = [input() for i in range(n)] q = input() m = [input() for i in range(q)] i = 0 j = 0 def solve(i,m): if m == 0: return True if i >= n: return False res = solve(i+1,m) | solve(i+1, m - A[i]) return res for M in range(m): if solve(0, M): print 'yes' else: print 'no'
File "/tmp/tmpod_khodj/tmpde1biwi8.py", line 18 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s434398478
p02271
u177808190
1453214846
Python
Python
py
Runtime Error
0
0
311
num_n = input() N = map(int, raw_input()) num_m = input() M = map(int, raw_input()) def solve(i, m): if m == 0: return True if i >= num_n: return False res = solve(i + 1, m) or solve(i + 1,m - N[i]) return res for m in M: if solve(0, m): print "yes" else: print "no"
File "/tmp/tmpcfzr_yvd/tmp0rbqf1x0.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s269857004
p02271
u177808190
1453214953
Python
Python
py
Runtime Error
0
0
374
num_n = raw_input() ele_n = raw_input() num_m = raw_input() ele_m = raw_input() n = int(ele_n.split()) m = int(ele_m.split()) def solve(i, t): if t == 0: return True if i >= num_n or t > sum(n): return False res = solve(i + 1, t) or solve(i + 1,t - n[i]) return res for t in m: if solve(0, t): print "yes" else: print "no"
File "/tmp/tmpcw1t6k1k/tmp_2gl74tv.py", line 19 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s616185499
p02271
u177808190
1453215010
Python
Python
py
Runtime Error
0
0
325
num_n = input() N = map(int, raw_input()) num_m = input() M = map(int, raw_input()) def solve(i, m): if m == 0: return True if i >= num_n or m > sum(M): return False res = solve(i + 1, m) or solve(i + 1,m - N[i]) return res for m in M: if solve(0, m): print "yes" else: print "no"
File "/tmp/tmp17lllkaa/tmpxa53fg3i.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s250651423
p02271
u177295149
1453215126
Python
Python
py
Runtime Error
0
0
346
n = input() A = map(int, raw_input().split()) q = input() M = map(int, raw_input().split()) def solve(i, m): if m == 0: return True if n <= i or sum(A) < m: return False res = (solve(i+1, m) or solve(i+1, m-A[i])) return res for m inrange M: if solve(0, m): print "yes" else: print "no"
File "/tmp/tmpsgzxbrkc/tmpjedg0u41.py", line 14 for m inrange M: ^^^^^^^ SyntaxError: invalid syntax
s905919742
p02271
u177295149
1453215133
Python
Python
py
Runtime Error
0
0
347
n = input() A = map(int, raw_input().split()) q = input() M = map(int, raw_input().split()) def solve(i, m): if m == 0: return True if n <= i or sum(A) < m: return False res = (solve(i+1, m) or solve(i+1, m-A[i])) return res for m in range M: if solve(0, m): print "yes" else: print "no"
File "/tmp/tmphrp240ke/tmpt4olevqi.py", line 14 for m in range M: ^ SyntaxError: invalid syntax
s512518703
p02271
u177295149
1453215140
Python
Python
py
Runtime Error
0
0
349
n = input() A = map(int, raw_input().split()) q = input() M = map(int, raw_input().split()) def solve(i, m): if m == 0: return True if n <= i or sum(A) < m: return False res = (solve(i+1, m) or solve(i+1, m-A[i])) return res for m in range (M): if solve(0, m): print "yes" else: print "no"
File "/tmp/tmpsf7sy90w/tmp0669_ts3.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s396918492
p02271
u177808190
1453215192
Python
Python
py
Runtime Error
0
0
339
num_n = input() N = map(int, raw_input().split) num_m = input() M = map(int, raw_input().split) def solve(i, m): if m == 0: return True if i >= num_n or m > sum(M): return False res = solve(i + 1, m) or solve(i + 1,m - N[i]) return res for m in M: if solve(0, m): print "yes" else: print "no"
File "/tmp/tmplbalakqh/tmp8t49kvmy.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s932131538
p02271
u682357930
1453215224
Python
Python
py
Runtime Error
0
0
311
n = input() A = map(int, raw_input().split()) q = input() M = map(int, raw_input().split()) def solve(i,m): if m == 0: return True if i >= n: return False i = i + 1 res = solve(i,m) or solve(i, m - A[i]) return res for m in M: if solve(0, m): print 'yes' else: print 'no'
File "/tmp/tmp76tuq67g/tmp8bvd5exw.py", line 17 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s433269782
p02271
u682357930
1453215240
Python
Python
py
Runtime Error
0
0
299
n = input() A = map(int, raw_input().split()) q = input() M = map(int, raw_input().split()) def solve(i,m): if m == 0: return True if i >= n: return False res = solve(i,m) or solve(i, m - A[i]) return res for m in M: if solve(0, m): print 'yes' else: print 'no'
File "/tmp/tmph8vt131c/tmps5paea97.py", line 16 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s278222208
p02271
u177808190
1453216286
Python
Python
py
Runtime Error
0
0
352
num_n = input() n = map(int, raw_input().split()) num_m = input() m = map(int, raw_input().split()) def solve(i, m): if m == 0: return True if i >= num_n or m > sum(n): return False res = solve(i + 1, m) or solve(i + 1,m - n[i]) return res for k in m: if solve(0, m[k]): print "yes" else: print "no"
File "/tmp/tmpncgg3rsr/tmpp4jrg7cc.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s719495189
p02271
u803327846
1453292052
Python
Python
py
Runtime Error
0
0
250
n = input() A = map(int, raw_input().split()) m = input() def solve(i,j): if m == 0: return 1 if i >= n: return 0 res = solve(i + 1, m) or solve(i + 1, m - A[i]) for k in range(n) if solve(0,m): print 'Yes' else: print 'No'
File "/tmp/tmpbscvz3j6/tmpu9isazdv.py", line 11 for k in range(n) ^ SyntaxError: expected ':'
s520964993
p02271
u803327846
1453292148
Python
Python
py
Runtime Error
0
0
366
n_n = int(input()) n = map(int, raw_input().split()) n_m= int(input()) m = map(int, raw_input().split()) def solve(i, m): if m == 0: return True if i >= n_n or m > sum(n): return False res = solve(i + 1, m) or solve(i + 1,m - n[i]) return res for k in range(m_m): if solve(0, m[k]): print "yes" else: print "no"
File "/tmp/tmpg9q7eqji/tmpx5ndew8t.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s895668058
p02271
u247976584
1454227247
Python
Python3
py
Runtime Error
0
0
581
class ExhaustiveSearch: def solve(self, n, a, q, m): for mm in m: if self.es(0, mm): print("yes") else: print("no") def es(self, i, m): if m == 0: return True if i >= n: return False res = self.es(i + 1, m) or self.es(i + 1, m - a[i]) return res if __name__ == '__main__': n = int(input()) a = list(map(int, input().split(" "))) q = int(input()) m = list(map(int, input().split(" "))) x = ExhaustiveSearch() x.solve(n, a, q, m)
Traceback (most recent call last): File "/tmp/tmp6xr2neut/tmpwv37lfy3.py", line 17, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s893401596
p02271
u247976584
1454227313
Python
Python3
py
Runtime Error
0
0
530
class ExhaustiveSearch: def solve(self, n, a, q, m): for mm in m: if self.es(0, mm): print("yes") else: print("no") def es(self, i, m): if m == 0: return True if i >= n: return False res = self.es(i + 1, m) or self.es(i + 1, m - a[i]) return res n = int(input()) a = list(map(int, input().split(" "))) q = int(input()) m = list(map(int, input().split(" "))) x = ExhaustiveSearch() x.solve(n, a, q, m)
Traceback (most recent call last): File "/tmp/tmphqa8vf2h/tmpskldnsb2.py", line 16, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s117124712
p02271
u974554153
1454421503
Python
Python
py
Runtime Error
0
0
308
n = input() A = map(int, raw_input().split()) q = input() M = map(int, raw_input().split()) def solve(i, m): if m=0: return True if i>=n or m>sum(A): return False res=solve(i+1,m) or solve(i+1,m-A[i]) return res for m in M: if solve(0,m): print"yes" else: print"no"
File "/tmp/tmpq8mdnext/tmpqp0j8l71.py", line 7 if m=0: ^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s033828318
p02271
u974554153
1454421546
Python
Python
py
Runtime Error
0
0
308
n = input() A = map(int, raw_input().split()) q = input() M = map(int, raw_input().split()) def solve(i, m): if m=0: return True if i>=n or m>sum(A): return False res=solve(i+1,m) or solve(i+1,m-A[i]) return res for m in M: if solve(0,m): print"yes" else: print"no"
File "/tmp/tmppycz1mmn/tmpg09sy6mv.py", line 7 if m=0: ^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s549225107
p02271
u974554153
1454422026
Python
Python
py
Runtime Error
0
0
404
def solve(i, j): if i = 0: return True if j < n and A[0] <= i <= sum(A[j:]): x = solve(i-A[j], j+1) if x: return x y = solve(i, j+1) if y: return y n = input() A = sorted(map(int, raw_input().split())) p = input() m = map(int, raw_input().split()) for k in m: if solve(k, 0): print "yes" else: print "no"
File "/tmp/tmpli7mt4yd/tmp9eygas99.py", line 2 if i = 0: ^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s291881974
p02271
u294007207
1458370325
Python
Python
py
Runtime Error
0
0
635
''' Created on 2016/03/18 @author: toshi ''' from veusz.document.export import m_inch #n = map(int, raw_input()) n = int(raw_input()) A = map(int, raw_input().split()) #q = map(int, raw_input()) q = int(raw_input()) m = map(int, raw_input().split()) A = sorted(A) def sum_A(A, n, pos, sum, m, flg): if flg[0] == "yes": return 0 if sum == m: flg[0] = "yes" return 0 if pos + 1 > n - 1: return 0 sum_A(A, n, pos + 1, sum + A[pos], m, flg) sum_A(A, n, pos + 1, sum, m, flg) for i, m_i in enumerate(m): sum = 0 flg = ["no"] sum_A(A, n, 0, sum, m_i, flg) print flg[0]
File "/tmp/tmpilh1zb4h/tmpp_qvkswl.py", line 32 print flg[0] ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s513103996
p02271
u247279609
1458704753
Python
Python
py
Runtime Error
0
0
331
def solve(i,m): if m == 0: return True if i >= n: return False return solve(i+1,m) or solve(i+1,m-A[i]) n = int(raw_input()) A = map(int, raw_input().split()) q = int(raw_input()) m = map(int, raw_input().split()) for num in m: if solve(0, num): return 'yes' else: return 'no'
File "/tmp/tmp28iqypaz/tmp7f4k3ilq.py", line 15 return 'yes' ^^^^^^^^^^^^ SyntaxError: 'return' outside function
s196360246
p02271
u003309334
1465740425
Python
Python
py
Runtime Error
0
0
465
n = int(raw_input()) A = map(int, raw_input().split()) q = int(raw_input()) mi = map(int, raw_input().split()) def f(m, A): a = list(A) i = 0 while True: while (i < len(a)) and (a[i] <= m): i+=1 m -= a[i-1] a.pop(i-1) if m == 0: return True elif m > 0: return f(m, a) else: return False for m in mi: if f(m, A): print "yes" else: print "no"
File "/tmp/tmp_i4l9wh9/tmpu8uj7r40.py", line 23 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s198310892
p02271
u648595404
1469895359
Python
Python3
py
Runtime Error
0
0
431
n = int(input()) A = list(map(int,input().split(" "))) q = int(input()) m = list(map(int,input().split(" "))) is_able_make = [False for i in range(2000)] for i in A: for j in range(2000-i,0,-1): if is_able_make[j] == True: is_able_make[i+j] = True is_able_make[i] = True for x in m: if(is_able_make[x] == True): print("yes") else: print("no")
Traceback (most recent call last): File "/tmp/tmpq6_uor20/tmp_elf9k0q.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s130004351
p02271
u648595404
1469895384
Python
Python3
py
Runtime Error
0
0
426
n = int(input()) A = list(map(int,input().split(" "))) q = int(input()) m = list(map(int,input().split(" "))) is_able_make = [False for i in range(2000)] for i in A: for j in range(2000-i,0,-1): if is_able_make[j] == True: is_able_make[i+j] = True is_able_make[i] = True for x in m: if(is_able_make[x] == True): print("yes") else: print("no")
Traceback (most recent call last): File "/tmp/tmpo1pzu08f/tmpd0vyc0kl.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s144945841
p02271
u092047183
1471778279
Python
Python3
py
Runtime Error
0
0
376
import numpy as np n1 = int(input()) A = np.array(list(map(int, input().split()))) n2 = int(input()) q = list(map(int, input().split())) B = [] n = n1 for r in q: ans = "no" for i in range(2 ** n): B = np.array(list(map(int, format(i, "b").zfill(n)))[::-1]) C = A * B if sum(C) == r: ans = "yes" break print(ans)
Traceback (most recent call last): File "/tmp/tmpom3xku9a/tmplzy4zg4s.py", line 3, in <module> n1 = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s163357543
p02271
u092047183
1471791615
Python
Python3
py
Runtime Error
0
0
403
n1 = int(input()) A = list(map(int, input().split())) n2 = int(input()) q = list(map(int, input().split())) B = [] n = n1 ans = list("no" for i in range(n2)) for i in range(2 ** n): C0 = [] B = list(map(int, format(i, "b").zfill(n)))[::-1] C0 = [ x*y for x, y in zip(A, B)] C.append(sum(C0)) for j, r in enumerate(q): if r in C: ans[j] = "yes" print(*ans, sep="\n")
Traceback (most recent call last): File "/tmp/tmpp2te0qoh/tmpvb86_5gn.py", line 1, in <module> n1 = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s061150409
p02271
u742013327
1479299276
Python
Python3
py
Runtime Error
0
0
994
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_5_A&lang=jp def solve(input_data, target_num): for i in range(len(input_data)): #print("begin") if exhaustive_search(input_data, i, target_num): return True return False def exhaustive_search(input_list, input_index, target_num): #print(target_num, input_list[input_index]) if target_num == 0: return True elif target_num < input_list[input_index]: return False return exhaustive_search(input_list, input_index + 1, target_num - input_list[input_index]) or exhaustive_search(input_list, input_index + 1, target_num) def main(): n_input = int(input()) input_data = [int(a) for a in input().split()] n_target = int(input()) target_list = [int(a) for a in input().split()] for m in target_list: if solve(input_data, m): print("yes") else: print("no") if __name__ == "__main__": main()
Traceback (most recent call last): File "/tmp/tmpozl0sccy/tmpsd5cwxf0.py", line 30, in <module> main() File "/tmp/tmpozl0sccy/tmpsd5cwxf0.py", line 18, in main n_input = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s943179073
p02271
u918276501
1485185107
Python
Python3
py
Runtime Error
0
0
327
n = int(input()) a = [int(input()) for _ in range(n)] input() m = [int(input()) for _ in range(n)] aa = [0 for _ in range(n**2)] for i in range(n): t = 2**i for j in range(n**2): if (j//t)%2: aa[j] += a[i] aa = set(aa) for k in m: if k in aa: print('yes') else: print('no')
Traceback (most recent call last): File "/tmp/tmphytpexvq/tmpjw3ep5yg.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s568759298
p02271
u708334265
1486471732
Python
Python3
py
Runtime Error
0
0
458
n = input() A = input().split(' ').sort() q = input() M = input().split(' ') for m in M: print_yn(search(0, m)) def search(sum_base, m): if sum_base == m: return true result = false for a in A: if sum_base + a <= m: r_branch = search(sum_base + a, m) result = result || r_branch return result def print_yn(result): if result: print('yes') else: print('no') return
File "/tmp/tmprlmx7i27/tmprzmnuexi.py", line 16 result = result || r_branch ^ SyntaxError: invalid syntax
s999687585
p02271
u708334265
1486471914
Python
Python
py
Runtime Error
0
0
76
n = input() A = input().split(' ').sort() q = input() M = input().split(' ')
Traceback (most recent call last): File "/tmp/tmpcuqcckcn/tmp9w8ykm50.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s930100217
p02271
u708334265
1486472377
Python
Python
py
Runtime Error
0
0
460
n = input() A = input().split(' ') A.sort() q = input() M = input().split(' ') for m in M: print_yn(search(0, m)) def search(sum_base, m): if sum_base == m: return true result = false for a in A: if sum_base + a <= m: r_branch = search(sum_base + a, m) result = result || r_branch return result def print_yn(result): if result: print('yes') else: print('no') return
File "/tmp/tmp2w4_0fp9/tmp4wl51p1a.py", line 17 result = result || r_branch ^ SyntaxError: invalid syntax
s957538810
p02271
u708334265
1486474039
Python
Python
py
Runtime Error
0
0
307
n = input() A = input().split(' ') A.sort() q = input() M = input().split(' ') def execute(m): for a1 in A: for a2 in A: if int(a1) != int(a2) and int(a1) + int(a2) == int(m): print('yes') return print('no') return for m in M: execute(m)
Traceback (most recent call last): File "/tmp/tmp16w3nqk_/tmpm1m7_k4h.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s824065309
p02271
u278465226
1489994061
Python
Python3
py
Runtime Error
0
0
283
def solve(m, A, i): if m==0: return True if i>n-1: return False f1 = solve(m-A[i], A, i+1) f2 = solve(m, A, i+1) return f1 or f2 n = int(input()) A = list(map(int, input().split())) input() for i in map( int, input().split() ): print( 'yes' if solve(M[i], A, 0) else 'no')
Traceback (most recent call last): File "/tmp/tmp7qbamn6q/tmp1zd4z1rb.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s105884444
p02271
u278465226
1489994143
Python
Python3
py
Runtime Error
0
0
283
def solve(m, A, i): if m==0: return True if i>n-1: return False f1 = solve(m-A[i], A, i+1) f2 = solve(m, A, i+1) return f1 or f2 n = int(input()) A = list(map(int, input().split())) input() for i in map( int, input().split() ): print( 'yes' if solve(M[i], A, 0) else 'no')
Traceback (most recent call last): File "/tmp/tmp35jp6ett/tmpg9mn27lc.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s626812592
p02271
u616085665
1497078557
Python
Python3
py
Runtime Error
0
0
382
def solve(A, m): if m == 0: return True if m<0 or len(m)==0: else: no_use = solve(A[1:], m-int(A[0])) if no_use: return True else: return (solve(A[1:], m)) def main(): n = int(input()) A = input() A = A.split() q = int(input()) ms= input() for m in ms.split(): if solve(A, int(m)): print('yes') else: print('no') if __name__ == '__main__': main()
File "/tmp/tmp6ss2urfx/tmp3m16vv4w.py", line 5 else: ^ IndentationError: expected an indented block after 'if' statement on line 4
s532262135
p02271
u616085665
1497078664
Python
Python3
py
Runtime Error
0
0
397
def solve(A, m): if m == 0: return True if m<0 or len(m)==0: return False else: no_use = solve(A[1:], m-int(A[0])) if no_use: return True else: return (solve(A[1:], m)) def main(): n = int(input()) A = input() A = A.split() q = int(input()) ms= input() for m in ms.split(): if solve(A, int(m)): print('yes') else: print('no') if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmps9ye87hl/tmphm44admv.py", line 26, in <module> main() File "/tmp/tmps9ye87hl/tmphm44admv.py", line 14, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line