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
s320995653
p02271
u604774382
1437315584
Python
Python3
py
Runtime Error
0
0
101
isExist = [False]*2001 n = int( input() ) q = int( input() ) for i in range( 0, 3 ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmprm1zco7v/tmpqclh1c1g.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s325178028
p02271
u604774382
1437315698
Python
Python3
py
Runtime Error
0
0
97
isExist = [0]*2001 n = int( input() ) q = int( input() ) for i in range( 0, 3 ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmpqb5qyz2j/tmpbo_sz0vi.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s485191781
p02271
u604774382
1437315830
Python
Python3
py
Runtime Error
0
0
356
isExist = [0]*2001 n = int( input() ) A = [ int( val ) for val in input().split( ' ' ) ] for i in A: for j in range( 2000-i, 0, -1 ): if 1 == isExist[j]: isExist[ i+j ] = 1 isExist[i] = 1 q = int( input() ) M = [ int( val ) for val in input().split( ' ' ) ] for i in range( 0, q ): if 1 == isExist[ M[i] ]: print( "yes" ) else: print( "no" )
Traceback (most recent call last): File "/tmp/tmpz7b6f7at/tmp5hnjyopz.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s657218292
p02271
u604774382
1437315877
Python
Python3
py
Runtime Error
0
0
249
isExist = [0]*2001 n = int( input() ) A = [ int( val ) for val in input().split( ' ' ) ] q = int( input() ) M = [ int( val ) for val in input().split( ' ' ) ] for i in range( 0, q ): if 1 == isExist[ M[i] ]: print( "yes" ) else: print( "no" )
Traceback (most recent call last): File "/tmp/tmpf0yfpho0/tmpo6zkl1uv.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s355865467
p02271
u604774382
1437315896
Python
Python3
py
Runtime Error
0
0
147
isExist = [0]*2001 n = int( input() ) q = int( input() ) for i in range( 0, q ): if 1 == isExist[ M[i] ]: print( "yes" ) else: print( "no" )
Traceback (most recent call last): File "/tmp/tmpfd6f83mt/tmpx872kd3c.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s748917348
p02271
u604774382
1437315920
Python
Python3
py
Runtime Error
0
0
97
isExist = [0]*2001 n = int( input() ) q = int( input() ) for i in range( 0, q ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmp1g2_n5lg/tmpk4rqabr6.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s119285275
p02271
u604774382
1437315943
Python
Python3
py
Runtime Error
0
0
97
isExist = [0]*2001 n = int( input() ) d = int( input() ) for i in range( 0, d ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmp5mkswwia/tmpturnik2q.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s033166049
p02271
u604774382
1437315956
Python
Python3
py
Runtime Error
0
0
97
isExist = [0]*2001 n = int( input() ) d = int( input() ) for i in range( 0, 5 ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmpe3a7tu_f/tmpkz_lgxj4.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s607872581
p02271
u604774382
1437315979
Python
Python3
py
Runtime Error
0
0
77
n = int( input() ) d = int( input() ) for i in range( 0, 5 ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmpdzae7zq3/tmpkhmxsqtx.py", line 1, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s098199995
p02271
u604774382
1437316060
Python
Python3
py
Runtime Error
0
0
77
a = int( input() ) d = int( input() ) for i in range( 0, 5 ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmpd4lsvcxa/tmp3jci4_j7.py", line 1, in <module> a = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s873640007
p02271
u604774382
1437316173
Python
Python3
py
Runtime Error
0
0
179
n = int( input() ) A = [ int( val ) for val in input().split( ' ' ) ] q = int( input() ) M = [ int( val ) for val in input().split( ' ' ) ] for i in range( 0, q ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmp9lqxutpo/tmpa8u23cp6.py", line 1, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s702405325
p02271
u604774382
1437316271
Python
Python3
py
Runtime Error
0
0
179
n = int( input() ) A = [ int( val ) for val in input().split( ' ' ) ] q = int( input() ) z = [ int( val ) for val in input().split( ' ' ) ] for i in range( 0, q ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmp11nphzuc/tmppxed4we2.py", line 1, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s257235149
p02271
u604774382
1437316358
Python
Python3
py
Runtime Error
0
0
246
import sys n = int( sys.stdin.readline( ) ) A = [ int( val ) for val in sys.stdin.readline( ).split( ' ' ) ] q = int( sys.stdin.readline( ) ) z = [ int( val ) for val in sys.stdin.readline( ).split( ' ' ) ] for i in range( 0, q ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmpy0nm7l3v/tmp9z4qkaua.py", line 2, in <module> n = int( sys.stdin.readline( ) ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s074872966
p02271
u604774382
1437316471
Python
Python3
py
Runtime Error
0
0
193
n = int( input( ) ) t = [ int( val ) for val in input( ).rstrip( ).split( " " ) ] q = int( input( ) ) s = [ int( val ) for val in input( ).split( " " ) ] for i in range( 0, q ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmpbqec_4vm/tmplfzw7tc_.py", line 1, in <module> n = int( input( ) ) ^^^^^^^^ EOFError: EOF when reading a line
s062854307
p02271
u604774382
1437316544
Python
Python3
py
Runtime Error
0
0
230
import sys n = int( sys.stdin.readline( ) ) A = [ int( val ) for val in input( ).rstrip( ).split( " " ) ] q = int( sys.stdin.readline( ) ) M = [ int( val ) for val in input( ).split( " " ) ] for i in range( 0, q ): print( "yes" )
Traceback (most recent call last): File "/tmp/tmp26wywmhx/tmpk830ruvn.py", line 2, in <module> n = int( sys.stdin.readline( ) ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s644923132
p02271
u604774382
1437316689
Python
Python3
py
Runtime Error
30
6724
366
isExist = [0]*2001 n = int( input() ) A = [ int( val ) for val in input().split( ' ' ) ] for i in A: for j in range( 2000-i, 0, -1 ): if 1 == isExist[j]: isExist[ i+j ] = 1 isExist[i] = 1 q = int( input() ) M = [ int( val ) for val in input().rstrip( ).split( ' ' ) ] for i in range( 0, q ): if 1 == isExist[ M[i] ]: print( "yes" ) else: print( "no" )
Traceback (most recent call last): File "/tmp/tmpc3pd7pvz/tmp60nldm91.py", line 2, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s904051991
p02271
u604774382
1437317103
Python
Python3
py
Runtime Error
0
0
396
def solve( p, t ): global isExist, n, A isExist[ t ] = True if p < n: solve( p+1, t-A[p] ) solve( p+1, t ) else: return isExist = [False]*2001 n = int( input() ) A = map( int, input().rstrip().split( " " ) ) q = int( input() ) M = map( int, input().rstrip().split( " " ) ) s = sum( A ) solve( 0, s ) for i in range( 0, q ): if isExist[ M[i] ]: print( "yes" ) else: print( "no" )
Traceback (most recent call last): File "/tmp/tmpcjug1ovm/tmpuph98la6.py", line 11, in <module> n = int( input() ) ^^^^^^^ EOFError: EOF when reading a line
s084095078
p02271
u882992966
1441962332
Python
Python3
py
Runtime Error
0
0
569
import sys def search_combination(elements, target): if len(elements) == 0: if target == 0: return True else: return False return search_combination(elements[1:], target - elements[0]) or search_combination(elements[1:], target) if __name__ == "__main__": lines = sys.stdin.readlines() elements = [int(x) for x in lines[1].split(" ")] targets = [int(x) for x in lines[3].split(" ")] for target in targets: result = "yes" if search_combination(elements, target) else "no" print(result)
Traceback (most recent call last): File "/tmp/tmp9d9utyhe/tmprk9b_g6d.py", line 15, in <module> elements = [int(x) for x in lines[1].split(" ")] ~~~~~^^^ IndexError: list index out of range
s697653821
p02271
u882992966
1441962457
Python
Python3
py
Runtime Error
0
0
593
#!/usr/bin/env python3 import sys def search_combination(elements, target): if len(elements) == 0: if target == 0: return True else: return False return search_combination(elements[1:], target - elements[0]) or search_combination(elements[1:], target) if __name__ == "__main__": lines = sys.stdin.readlines() elements = [int(x) for x in lines[1].split(" ")] targets = [int(x) for x in lines[3].split(" ")] for target in targets: result = "yes" if search_combination(elements, target) else "no" print(result)
Traceback (most recent call last): File "/tmp/tmpd2aaqq57/tmpug6irltd.py", line 17, in <module> elements = [int(x) for x in lines[1].split(" ")] ~~~~~^^^ IndexError: list index out of range
s556811716
p02271
u949338836
1446037934
Python
Python3
py
Runtime Error
0
0
355
#coding:utf-8 #1_5_A def solve(i, m): if m == 0: return True if i >= n: return False res = solve(i+1, m) or solve(i+1, m-numbers[i]) return res n = int(input()) numbers = list(map(int, input().split())) q = int(input()) for i in range(q): if solve(0, int(input())): print("yes") else: print("no")
Traceback (most recent call last): File "/tmp/tmpxupu4plm/tmpf5es56un.py", line 12, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s881037416
p02271
u488601719
1448255537
Python
Python3
py
Runtime Error
0
0
332
n = int(input()) A = list(map(int, input().split())) q = int(input()) M = list(map(int, input().split())) def solve(i, m): if (m == 0): return True if (i >= m): return False return solve(i+1, m) or solve(i+1, m-A[i]) for m in M: if (solve(0, m)): print("yes") else: print("no")
Traceback (most recent call last): File "/tmp/tmpj9x79heg/tmpqfm_0yif.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s517705899
p02271
u881590806
1448673583
Python
Python
py
Runtime Error
0
0
534
n = int(raw_input()) A = map(int, raw_input().split(' ')) q = int(raw_input()) M = map(int, raw_input().split(' ')) S = [0]*len(A) flags = [False]*len(M) def brute_force(n): if n == len(S): ans = 0 for i in range(len(S)): if S[i] == 1: ans += A[i] for i in range(len(M)): if ans == M[i]: flags[i] = True else: S[n] = 0 brute_force(n+1) S[n] = 1 brute_force(n+1) brute_force(0) for flag in flags: if flag: print "yes" else: print "no"
File "/tmp/tmp3vhx3041/tmpczxy7j8f.py", line 26 if flag: print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s404751872
p02271
u317901693
1451012948
Python
Python3
py
Runtime Error
0
0
510
# coding: utf-8 N = int(f.readline()) A = [int(i) for i in input().split()] q = int(f.readline()) m = [int(i) for i in input().split()] MAX_LENGTH = len(A) #i番目以降の値を使ってmを作ればTrueを返す def fullSearch(i, m): #終了条件 if m == 0: return True elif i >= MAX_LENGTH: return False else: #全探索かっこわるい return fullSearch(i + 1, m) or fullSearch(i + 1, m - A[i]) for i in m: print("yes" if fullSearch(0, i) else "no")
Traceback (most recent call last): File "/tmp/tmphagl3uji/tmps7xp4v8u.py", line 2, in <module> N = int(f.readline()) ^ NameError: name 'f' is not defined
s345589068
p02271
u970436839
1452650336
Python
Python
py
Runtime Error
0
0
269
n = input() A = map(int, raw_input().split()) q = input() m = map(int, raw_input().split()) for i in range(q): for j in range(n): if A[n-j] < m[i]: m[i] = m[i] - A[n-j] if m[i] <= 0: break if m[i] == 0: print "yes" else: print "no"
File "/tmp/tmpd0fxoe4j/tmp7yzfkksr.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s805452760
p02271
u038005340
1452651298
Python
Python
py
Runtime Error
0
0
283
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) m = map( int , raw_input().split() ) for i in n-1 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
File "/tmp/tmpis1p4m8s/tmpe_1yu1sp.py", line 6 for i in n-1 ^ SyntaxError: expected ':'
s732139694
p02271
u038005340
1452651405
Python
Python
py
Runtime Error
0
0
283
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) m = map( int , raw_input().split() ) for i in n-1 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
File "/tmp/tmp4q9y_jkp/tmp7x2ix081.py", line 6 for i in n-1 ^ SyntaxError: expected ':'
s628453616
p02271
u038005340
1452651507
Python
Python
py
Runtime Error
0
0
301
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) m = map( int , raw_input().split() ) for i in range( len(A) + 1 ): 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
File "/tmp/tmpvertcjva/tmpo05tfnw_.py", line 7 def solve(i, m) ^ SyntaxError: expected ':'
s766884062
p02271
u038005340
1452651545
Python
Python
py
Runtime Error
0
0
297
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) m = map( int , raw_input().split() ) for i in range( len(A) + 1 ): def solve(i, m) if m == 0: return yes if i >= n: return no res = solve( i+1 , m ) | solve( i+1 , m-A[i] ) return res
File "/tmp/tmp3v5_bxrs/tmp9snqgrdt.py", line 7 def solve(i, m) ^ SyntaxError: expected ':'
s357405734
p02271
u038005340
1452651716
Python
Python
py
Runtime Error
0
0
297
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) m = map( int , raw_input().split() ) for i in range( len(A) + 1 ): def solve(i, m) if m == 0: return yes if i >= n: return no res = solve( i+1 , m ) | solve( i+1 , m-A[i] ) return res
File "/tmp/tmpcvi17mn0/tmpxx1e_x01.py", line 7 def solve(i, m) ^ SyntaxError: expected ':'
s363507697
p02271
u970436839
1452651836
Python
Python
py
Runtime Error
0
0
247
n = input() A = map(int, raw_input().split()) q = input() m = map(int, raw_input().split()) for i in m: for j in range(n): if A[-j] <= i i = i - A[-j] if i <= 0: break if i == 0: print "yes" else: print "no"
File "/tmp/tmp4ulgwpg_/tmpi5gfrmbx.py", line 11 if A[-j] <= i ^ SyntaxError: expected ':'
s019022539
p02271
u970436839
1452651919
Python
Python
py
Runtime Error
0
0
305
n = input() A = {} 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 i in m: if solve(0,i): print "yes" else: print "no"
File "/tmp/tmp7mqaog0g/tmpm1b0axd8.py", line 21 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s730755918
p02271
u038005340
1452652157
Python
Python
py
Runtime Error
0
0
297
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) m = map( int , raw_input().split() ) for i in range( len(A) + 1 ): def solve(i, m) if m == 0: return yes if i >= n: return no res = solve( i+1 , m ) | solve( i+1 , m-A[i] ) return res
File "/tmp/tmp4a6lrq45/tmpxln7ogkj.py", line 7 def solve(i, m) ^ SyntaxError: expected ':'
s879783691
p02271
u970436839
1452652200
Python
Python
py
Runtime Error
0
0
311
n = input() A = {} 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/tmpu9p64y5r/tmpdpcgr8l3.py", line 21 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s156533059
p02271
u038005340
1452652320
Python
Python
py
Runtime Error
0
0
289
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) m = map( int , raw_input().split() ) for i in range( len(A) + 1 ): def solve(i, m) if m == 0 or solve( i+1 , m ) or solve( i+1 , m-A[i] ): return yes if i >= n or m < 0: return no
File "/tmp/tmp_m4_yc3l/tmpys8430kr.py", line 7 def solve(i, m) ^ SyntaxError: expected ':'
s768281349
p02271
u233232390
1452652377
Python
Python
py
Runtime Error
0
0
443
n = raw_input() A = map(int, raw_input().split()) d = {} def solution(i, m, n): if m == 0: return True if i >= n: return False if d.has_key((i, m)): return d[(i, m)] res = solution(i + 1, m, n) or solution(i + 1, m - A[i], n) d[(i, m)] = res return res q = raw_input() M = map(int, raw_input().split()) for m in M: if solution(0, m, n): print 'yes' else: print 'no'
File "/tmp/tmphh3s8m_p/tmphzju33xg.py", line 21 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s955647523
p02271
u233232390
1452652459
Python
Python
py
Runtime Error
0
0
433
n = raw_input() A = map(raw_input().split()) d = {} def solution(i, m, n): if m == 0: return True if i >= n: return False if d.has_key((i, m)): return d[(i, m)] res = solution(i + 1, m, n) or solution(i + 1, m - A[i], n) d[(i, m)] = res return res q = raw_input() M = map(raw_input().split()) for m in M: if solution(0, m, n): print 'yes' else: print 'no'
File "/tmp/tmpwelvt1iw/tmpaoschhk1.py", line 21 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s811853474
p02271
u038005340
1452652525
Python
Python
py
Runtime Error
0
0
293
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) m = map( int , raw_input().split() ) for i in range( len(A) + 1 ): def solve(i, m) if m == 0 or solve( i+1 , m ) or solve( i+1 , m-A[i] ): print 'yes' if i >= n or m < 0: print 'no'
File "/tmp/tmpb059jc2o/tmper1ttxze.py", line 7 def solve(i, m) ^ SyntaxError: expected ':'
s342634510
p02271
u038005340
1452652846
Python
Python
py
Runtime Error
0
0
376
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) mi = map( int , raw_input().split() ) for i in range( len(A) + 1 ): 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 for m in mi if solve( 0 , m ): print 'yes' else: print 'no'
File "/tmp/tmp6gfl9ml_/tmpjh24hbej.py", line 7 def solve(i, m) ^ SyntaxError: expected ':'
s542824476
p02271
u038005340
1452652890
Python
Python
py
Runtime Error
0
0
376
n = int( raw_input() ) A = map( int , raw_input().split() ) q = int( raw_input() ) mi = map( int , raw_input().split() ) for i in range( len(A) + 1 ): 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 for m in mi if solve( 0 , m ): print 'yes' else: print 'no'
File "/tmp/tmpkscemq2s/tmpxbfb0uyk.py", line 7 def solve(i, m) ^ SyntaxError: expected ':'
s068466608
p02271
u038005340
1452652972
Python
Python
py
Runtime Error
0
0
310
n = input() A = map( int , raw_input().split() ) q = input() mi = map( int , raw_input().split() ) 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 for m in mi if solve( 0 , m ): print 'yes' else: print 'no'
File "/tmp/tmpinf1lgnd/tmpxq7mlokf.py", line 6 def solve(i, m) ^ SyntaxError: expected ':'
s752129650
p02271
u619765879
1452652974
Python
Python
py
Runtime Error
0
0
313
def main(): n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) for i in range(q) if solve(0, m[q], A) for j in range() def solve(int i, int m, A): if m == 0: return 1 if i >= n: return 0 res = solve(i+1, m) or solve(i+1, m-A[i]) return res
File "/tmp/tmpfqj2pf0l/tmpnxac_qdf.py", line 6 for i in range(q) ^ SyntaxError: expected ':'
s235943855
p02271
u038005340
1452652998
Python
Python
py
Runtime Error
0
0
312
n = input() A = map( int , raw_input().split() ) q = input() mi = map( int , raw_input().split() ) 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 for m in mi: if solve( 0 , m ): print 'yes' else: print 'no'
File "/tmp/tmpwa65txui/tmpjl_3dpso.py", line 16 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s475945675
p02271
u970436839
1452653002
Python
Python
py
Runtime Error
0
0
327
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/tmpj8eo6yfe/tmpbzsjbycb.py", line 12 if i >= n or m > sum(A) ^ SyntaxError: expected ':'
s417091157
p02271
u834416077
1452653033
Python
Python
py
Runtime Error
0
0
297
n = input() a = [] b = [] for i in range(n): a[i] = input() m = input() for j in range(m): b[j] = input() for j in range(m): for i in range(n): if b[j] - a[i] < 0: i = i + 1 elif b[j] - a[i] == 0: return yes elif b[j] - a[i] > 0: b[j] = b[j] - a[i] return no
File "/tmp/tmpgmixod6m/tmpojxtqmt2.py", line 17 return yes ^^^^^^^^^^ SyntaxError: 'return' outside function
s827073411
p02271
u619765879
1452653102
Python
Python
py
Runtime Error
0
0
340
def main(): n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) for i in range(q) if solve(0, m[q], A): print 'yes' else: print 'no' def solve(int i, int m, A): if m == 0: return 1 if i >= n: return 0 res = solve(i+1, m) or solve(i+1, m-A[i]) return res
File "/tmp/tmpcwiyv8tx/tmpdmxwp_fy.py", line 6 for i in range(q) ^ SyntaxError: expected ':'
s906448702
p02271
u619765879
1452653201
Python
Python
py
Runtime Error
0
0
303
def solve(i, m, A): if m == 0: return 1 if i >= n: return 0 res = solve(i+1, m) or solve(i+1, m-A[i]) return res n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) for i in range(q) if solve(0, m[q], A): print 'yes' else: print 'no'
File "/tmp/tmpux3rnlxt/tmpn7hqbq50.py", line 14 for i in range(q) ^ SyntaxError: expected ':'
s971744576
p02271
u619765879
1452653221
Python
Python
py
Runtime Error
0
0
297
def solve(i, m): if m == 0: return 1 if i >= n: return 0 res = solve(i+1, m) or solve(i+1, m-A[i]) return res n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) for i in range(q) if solve(0, m[q]): print 'yes' else: print 'no'
File "/tmp/tmpc4oiht9o/tmp2qhwvokm.py", line 14 for i in range(q) ^ SyntaxError: expected ':'
s507449931
p02271
u038005340
1452653251
Python
Python
py
Runtime Error
0
0
356
n = int( raw_input() ) A = map( int , raw_input().strip().split(' ') ) q = int( raw_input() ) mi = map( int , raw_input().strip().split(' ') ) 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 for m in mi: if solve( 0 , m ): print 'yes' else: print 'no'
File "/tmp/tmpvf_nmgic/tmpw4f29ymy.py", line 16 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s360963726
p02271
u619765879
1452653274
Python
Python
py
Runtime Error
0
0
321
def solve(i, m, A, n): if m == 0: return 1 if i >= n: return 0 res = solve(i+1, m, A, n) or solve(i+1, m-A[i], A, n) return res n = input() A = map(int, raw_input().split()) p = input() m = map(int, raw_input().split()) for i in range(q) if solve(0, m[q], A, n): print 'yes' else: print 'no'
File "/tmp/tmpuvl_fftc/tmppzj1h64f.py", line 14 for i in range(q) ^ SyntaxError: expected ':'
s987333996
p02271
u834416077
1452653283
Python
Python
py
Runtime Error
0
0
278
n = input() a = [] b = [] for i in range(n): a[i] = input() m = input() for j in range(m): b[j] = input() for i in range(n): if b[j] - a[i] < 0: i = i + 1 elif b[j] - a[i] == 0: return yes elif b[j] - a[i] > 0: b[j] = b[j] - a[i] return no
File "/tmp/tmp7vrxm0gz/tmp5l1f7p70.py", line 16 return yes ^^^^^^^^^^ SyntaxError: 'return' outside function
s130360904
p02271
u038005340
1452653287
Python
Python
py
Runtime Error
0
0
355
n = int( raw_input() ) A = map( int , raw_input().strip().split(' ') ) q = int( raw_input() ) mi = map( int , raw_input().strip().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 m in mi: if solve( 0 , m ): print 'yes' else: print 'no'
File "/tmp/tmpjon0ru_7/tmpusf_ug9j.py", line 16 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s699992317
p02271
u834416077
1452653662
Python
Python
py
Runtime Error
0
0
278
n = input() a = [] b = [] for i in range(n): a[i] = input() m = input() for j in range(m): b[j] = input() for i in range(n): if b[j] - a[i] < 0: i = i + 1 elif b[j] - a[i] == 0: return yes elif b[j] - a[i] > 0: b[j] = b[j] - a[i] return no
File "/tmp/tmpoya60tz8/tmpr6nm8c7m.py", line 16 return yes ^^^^^^^^^^ SyntaxError: 'return' outside function
s192207651
p02271
u000228958
1452653713
Python
Python3
py
Runtime Error
0
0
360
def solve(i, m): if m == 0: return True elif i >= n: return False if solve(i + 1, m) or solve(i + 1, m - A[i]) == True: return True else: return False n = input() A = map(int, raw_input().split()) q = input() m = map(int, raw_input().split()) for i in xrange(q): if solve(0, m[i]) == True: print "yes" else: print "no"
File "/tmp/tmpih3odwai/tmp3k78ge99.py", line 22 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s489072272
p02271
u613805578
1452653828
Python
Python
py
Runtime Error
0
0
369
n = input() A = [] for i in range(n): A.append(int(raw_input())) q = input() M = [] for i in range(n): M.append(int(raw_input())) 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 in range(len(M)): if solve(0,m): print "yes" else: print "no"
File "/tmp/tmpmzy2g0ok/tmp40ryxb6y.py", line 11 def solve(i, m) ^ SyntaxError: expected ':'
s289586433
p02271
u038005340
1452653901
Python
Python
py
Runtime Error
0
0
320
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 elif i >= n: return False else: res = solve( i+1 , m ) | solve( i+1 , m-A[i] ) return res for m in mi: if solve( 0 , m ): print "yes" else: print "no"
File "/tmp/tmpi5huep69/tmpd88o4gzt.py", line 16 if solve( 0 , m ): print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s493441711
p02271
u613805578
1452653921
Python
Python
py
Runtime Error
0
0
356
n = input() A = [] for i in range(n): A.append(int(raw_input())) q = input() M = [] for i in range(n): M.append(int(raw_input())) 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 in M: if solve(0,m): print "yes" else: print "no"
File "/tmp/tmpbje_d4fv/tmpl1dbq8ye.py", line 11 def solve(i, m) ^ SyntaxError: expected ':'
s968169962
p02271
u613805578
1452653946
Python
Python
py
Runtime Error
0
0
356
n = input() A = [] for i in range(n): A.append(int(raw_input())) q = input() M = [] for i in range(n): M.append(int(raw_input())) 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 for i in M: if solve(0,m): print "yes" else: print "no"
File "/tmp/tmpooo3t_b8/tmppvj0vr9p.py", line 11 def solve(i, m) ^ SyntaxError: expected ':'
s128050661
p02271
u047737909
1452654092
Python
Python
py
Runtime Error
0
0
307
def fact(k): if k == 0: return 1 return k * fact(k - 1) n = input() a=[0]*n for i in range(n): a = input() q = input() m = [0]*q for i in range(q): m = input() ans=[0]*fact(k) for s in range(t): for t in range(n): ans[s*(t+1)] +=a[t] if x in ams: print'yes' else: print'no'
File "/tmp/tmpqrulpnh9/tmptd1goju6.py", line 24 print'yes' ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s943752827
p02271
u177808190
1452654211
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() for i in range(int(num_n) - 1): for j in range(2 ** (int(num_m) - 1)): sum[j] = 0 sum[j] += m[j] sum += m[j] if n[i] == sum: print "yes" break print "no"
File "/tmp/tmp97kfv7x6/tmpuruari_2.py", line 15 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s984827682
p02271
u655651061
1452690354
Python
Python
py
Runtime Error
0
0
267
n1 = input() A = map(int, raw_input().split()) n2 = input() q = map(int, raw_input().split()) list = set() for i in range(n1): for j in range(n2): if i != j: list.add( A[i] + A[j] ) for i in range(n2): if q[i] in list: print "yes" else: print "no"
File "/tmp/tmpgkfz2zhc/tmpcp3tcxcj.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s778087346
p02271
u613805578
1452702201
Python
Python
py
Runtime Error
0
0
309
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 and m > sum(A) return false res = solve(i + 1, m) or solve(i + 1, m - A[i]) return res for m in M if res = solve(0,m): print 'yes' else: print 'no'
File "/tmp/tmpm1s3l_q4/tmpjr8jfffz.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s700599602
p02271
u613805578
1452702220
Python
Python
py
Runtime Error
0
0
309
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 and m > sum(A) return False res = solve(i + 1, m) or solve(i + 1, m - A[i]) return res for m in M if res = solve(0,m): print 'yes' else: print 'no'
File "/tmp/tmp8goi4jv6/tmps1tb2wzx.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s493455504
p02271
u613805578
1452702248
Python
Python
py
Runtime Error
0
0
315
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 and m > sum(A) return False res = solve(i + 1, m) or solve(i + 1, m - A[i]) return res for m in M if res = solve(0,m): print 'yes' else: print 'no'
File "/tmp/tmpsxxm3y9i/tmp19v4hivy.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s657327284
p02271
u613805578
1452702284
Python
Python
py
Runtime Error
0
0
309
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 and 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/tmp8lxmesrj/tmpulr_70ze.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s904916356
p02271
u613805578
1452702310
Python
Python
py
Runtime Error
0
0
310
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 and 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/tmpvx7sy2yw/tmp1_5q0btb.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s891073076
p02271
u613805578
1452702502
Python
Python
py
Runtime Error
0
0
309
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/tmpve3z06t2/tmpvh38behz.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s362906935
p02271
u613805578
1452702872
Python
Python
py
Runtime Error
0
0
310
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/tmptrna8elz/tmp5z5fuumg.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s219838916
p02271
u613805578
1452702891
Python
Python
py
Runtime Error
0
0
310
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/tmp633lg_0g/tmpqswu2lfh.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s357838179
p02271
u613805578
1452702943
Python
Python
py
Runtime Error
0
0
306
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/tmpcwdrqkim/tmpjc8g5pey.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s155579645
p02271
u613805578
1452702967
Python
Python
py
Runtime Error
0
0
302
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/tmpzlry7d6w/tmpdarowzd0.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s037491554
p02271
u613805578
1452702973
Python
Python
py
Runtime Error
0
0
304
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/tmpmoa2e4j2/tmprcbjwf1g.py", line 7 if m == 0: ^ IndentationError: expected an indented block after function definition on line 6
s865673095
p02271
u885889402
1452706938
Python
Python3
py
Runtime Error
0
0
529
def check(m,g,A,n): for i in range(n): gg = g + A[n-i-1] if m == gg: return True elif n == 0 or m < gg: continue if check(m,gg,A,n-i-1) == True: return True return False n=int(input()) A=list(map(int,str.split(input()))) q = int(input()) m=list(map(int,str.split(input()))) mini = min(A) nor = sum(A) for mi in m: if mi < mini or mi > nor: print(no) if check(mi,0,A,n): print("yes") else: print("no")
Traceback (most recent call last): File "/tmp/tmp9m7ov5h4/tmp9n71cerr.py", line 14, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s531619799
p02271
u724923896
1452831592
Python
Python
py
Runtime Error
0
0
332
n = input() A = map(int, input().split()) q = input() m = map(int, input().split()) def solve(i, m): if i == m: return true if i > n: return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res for j in range(0, q-1): if m == solve(i + 1, m) || solve(i + 1, m - A[i]): print "yes" else: print "no"
File "/tmp/tmpdwvy0_t5/tmp92wp_lh2.py", line 11 res = solve(i + 1, m) || solve(i + 1, m - A[i]) ^ SyntaxError: invalid syntax
s641465652
p02271
u724923896
1452832042
Python
Python
py
Runtime Error
0
0
305
n = input() A = map(int, input().split()) q = input() m = map(int, input().split()) def solve(i, m): if i == m: return true if i > n: return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res for j in range(0, q-1): if m == solve(j, m(j)): print "yes" else: print "no"
File "/tmp/tmp_xn18cht/tmp0e5hnnnb.py", line 11 res = solve(i + 1, m) || solve(i + 1, m - A[i]) ^ SyntaxError: invalid syntax
s799054178
p02271
u724923896
1452832241
Python
Python
py
Runtime Error
0
0
300
n = input() A = map(int, input().split()) q = input() m = map(int, input().split()) def solve(i, m): if i == m: return true if i > n: return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res for j in range(0, q-1): if m == solve(j, m(j)): print "yes" else: print "no"
File "/tmp/tmps4jqocs0/tmpbt8cmgxi.py", line 11 res = solve(i + 1, m) || solve(i + 1, m - A[i]) ^ SyntaxError: invalid syntax
s830036169
p02271
u724923896
1452832289
Python
Python
py
Runtime Error
0
0
312
n = input() A = map(int, input().split()) q = input() m = map(int, input().split()) def solve(i, m): if i == m: return true if i > n: return false res = solve(i + 1, m) || solve(i + 1, m - A[i]) return res for j in range(0, q-1): if m == solve(j, m(j)): print "yes" else: print "no"
File "/tmp/tmpwoyopunz/tmptldl_cjr.py", line 6 def solve(i, m): IndentationError: unexpected indent
s553442941
p02271
u724923896
1452832360
Python
Python
py
Runtime Error
0
0
310
n = input() A = map(int, input().split()) q = input() m = map(int, input().split()) def solve(i, m): if i == m: return true if i > n: return false res = solve(i + 1, m) || solve(i + 1, m - A(i)) return res for j in range(0, q): if m == solve(j, m(j)): print "yes" else: print "no"
File "/tmp/tmpblcl5tu8/tmpv3_xw4wo.py", line 6 def solve(i, m): IndentationError: unexpected indent
s707610872
p02271
u724923896
1452832579
Python
Python
py
Runtime Error
0
0
316
n = raw_input() A = map(int, raw_input().split()) q = raw_input() m = map(int, raw_input().split()) def solve(i, m): if i == m: return true if i > n: return false res = solve(i + 1, m) || solve(i + 1, m - A(i)) return res for j in range(0, q-1): if m == solve(0, m(j)): print "yes" else: print "no"
File "/tmp/tmppnh1xkii/tmp0mj4mru7.py", line 11 res = solve(i + 1, m) || solve(i + 1, m - A(i)) ^ SyntaxError: invalid syntax
s935859506
p02271
u724923896
1452832628
Python
Python
py
Runtime Error
0
0
315
n = raw_input() A = map(int, raw_input().split()) q = raw_input() m = map(int, raw_input().split()) def solve(i, m): if i == m: return true if i > n: return false res = solve(i + 1, m) || solve(i + 1, m - A(i)) return res for j in range(0, q-1): if m == solve(j, m(j)): print "yes" else: print "no"
File "/tmp/tmpzgbmgtp_/tmpijbi_w6y.py", line 11 res = solve(i + 1, m) || solve(i + 1, m - A(i)) ^ SyntaxError: invalid syntax
s093532275
p02271
u724923896
1452832689
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 i == m: return true if i > n: return false res = solve(i + 1, m) or solve(i + 1, m - A(i)) return res for j in range(0, q): if m == solve(0, m(j)): print "yes" else: print "no"
File "/tmp/tmph8drd1kp/tmpl0aus_sf.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s757698570
p02271
u724923896
1452832815
Python
Python
py
Runtime Error
0
0
343
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 and m > 0: ????return false ??res = solve(i + 1, m) or solve(i + 1, m - A(i)) ??return res ???? for j in range(0, q): ??if m == solve(0, m(j)): ????print "yes" ??else: ????print "no"
File "/tmp/tmpvjz956cu/tmpn8ozlc97.py", line 5 ?? ^ SyntaxError: invalid syntax
s735300905
p02271
u724923896
1452832886
Python
Python
py
Runtime Error
0
0
323
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 and m > 0: return false res = solve(i + 1, m) or solve(i + 1, m - A(i)) return res for j in range(0, q): if m == solve(0, m(j)): print "yes" else: print "no"
File "/tmp/tmpu_0ey0jg/tmpp2ucjgl1.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s430168674
p02271
u724923896
1452833130
Python
Python
py
Runtime Error
0
0
300
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 + 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/tmpp7ldilli/tmpys6o3alc.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s664261360
p02271
u724923896
1452833308
Python
Python
py
Runtime Error
0
0
323
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 and m > 0: return false res = solve(i + 1, m) or solve(i + 1, m - A[i]) return res for j in range(0, q): if m == solve(0, m[j]): print "yes" else: print "no"
File "/tmp/tmpyjlhpbml/tmp5042wgsj.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s470493075
p02271
u724923896
1452833523
Python
Python
py
Runtime Error
0
0
301
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 1 if i >= n: 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/tmpfcvlgchs/tmpkzu94c5t.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s726073585
p02271
u724923896
1452833720
Python
Python
py
Runtime Error
0
0
317
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 and m > sum(A): return False res = solve(i + 1, m) or solve(i + 1, m - A[i]) return res for j in range(0, q-1): if solve(0, m[j]): print "yes" else: print "no"
File "/tmp/tmps067ie_z/tmphztfln_q.py", line 16 print "yes" ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s389303258
p02271
u069446126
1452876460
Python
Python
py
Runtime Error
0
0
637
n = int(raw_input()) A = map(int, raw_input().split()) sorted(A) q = int(raw_input()) M = map(int, raw_input().split()) sorted(M) result = [] for i in range(q): result.append('no ') for i in range(n-1): sum_n = A[i] M_clone = M[:] flag = False for j in range(n-1-i): if flag: break sum_n += A[i+1+j] for k in range(len(M)): if M_clone[k] == sum_n: result[k] = 'yes ' M.pop(k) flag = True break elif M_clone[k] < sum_n: M_clone.pop(k) for i in range(q): print result[i]
File "/tmp/tmpvd0m2hdc/tmp7gaoqq38.py", line 32 print result[i] ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s174648572
p02271
u069446126
1452876682
Python
Python
py
Runtime Error
0
0
640
n = int(raw_input()) A = map(int, raw_input().split()) A.sort() q = int(raw_input()) M = map(int, raw_input().split()) M.sort() result = [] for i in range(q): result.append('no') for i in range(n-1): sum_n = A[i] M_clone = M[:] flag = False for j in range(n-1-i): if flag: break sum_n = sum_n + A[i+1+j] for k in range(len(M)): if M_clone[k] == sum_n: result[k] = 'yes' M.pop(k) flag = True break elif M_clone[k] < sum_n: M_clone.pop(k) for i in range(q): print result[i]
File "/tmp/tmp5ln1481l/tmpoquh194j.py", line 32 print result[i] ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s231514672
p02271
u069446126
1452877537
Python
Python
py
Runtime Error
0
0
631
n = int(raw_input()) A = map(int, raw_input().split()) A.sort() q = int(raw_input()) M = map(int, raw_input().split()) M.sort() result = [] for i in range(q): result.append('no') for i in range(n-1): sum_n = A[i] M_clone = M[:] flag = False for j in range(n-1-i): if flag: break sum_n = sum_n + A[i+1+j] for k in range(len(M)): if M_clone[k] == sum_n: result[k] = 'yes' M.pop(k) flag = True break elif M_clone[k] < sum_n: M_clone.pop(k) for i in result: print(i)
Traceback (most recent call last): File "/tmp/tmpw1znb28m/tmp2islmd60.py", line 2, in <module> n = int(raw_input()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s362302606
p02271
u824216249
1452926705
Python
Python
py
Runtime Error
0
0
393
n = input() A = map(int,raw_input().split()) q = input() M = map(int,raw_input().split()) def tansaku(Mi,i): if Mi == 0: return True if i < n and min(A[i:] <= Mi <= sum(A[i:]): r1 = tansaku(Mi-A[i],i+1) #Mi-A[i] == 0 ????????°???True if r1: return r1 r2 = tansaku(Mi,i+1) if r2: return r2 for Mi in M: print "yes" if solve(Mi,0) else "no"
File "/tmp/tmptl6t76kj/tmpcear9h2l.py", line 8 if i < n and min(A[i:] <= Mi <= sum(A[i:]): ^ SyntaxError: invalid syntax
s202954797
p02271
u069446126
1452936302
Python
Python
py
Runtime Error
0
0
445
n = int(raw_input()) A = map(int, raw_input().split()) q = int(raw_input()) M = map(int, raw_input().split()) result = [] for i in range(q): result.append('no') for i in range(n-1): sum_n = A[i] for j in range(n-1-i): ad = A[i+1+j] for k in range(n-2-j): sum_n = sum_n + ad ad = ad + A[i+j+2+k] if M[k] == sum_n: result[k] = 'yes' for i in result: print(i)
Traceback (most recent call last): File "/tmp/tmphyuharjm/tmpbs8ong1d.py", line 2, in <module> n = int(raw_input()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s196647091
p02271
u069446126
1452941996
Python
Python
py
Runtime Error
0
0
502
for i in range(n): sum_n = A[i] for j in range(q): if M[j] == sum_n: result[j] = 'yes' for j in range(n-1-i): sum_n = A[i] ad = A[i+j+1] sum_n = sum_n + ad for k in range(q): if M[k] == sum_n: result[k] = 'yes' for k in range(n-2-i-j): ad = ad + A[i+j+2+k] sum_n = sum_n + ad for l in range(q): if M[l] == sum_n: result[l] = 'yes'
Traceback (most recent call last): File "/tmp/tmp5atg90ts/tmplhy7ssjt.py", line 1, in <module> for i in range(n): ^ NameError: name 'n' is not defined
s252011457
p02271
u619765879
1452962637
Python
Python
py
Runtime Error
0
0
433
def solve(i, m): if dp[i][m]==0 or 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()) for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmpax7dtxxc/tmpm14acp8i.py", line 26 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s780186561
p02271
u619765879
1452962676
Python
Python
py
Runtime Error
0
0
417
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()) for i in range(p): if solve(0, m[i]): print 'yes' else: print 'no'
File "/tmp/tmpa_vtp9y9/tmphmvss408.py", line 2 if dp[i][m]==1 ^ SyntaxError: expected ':'
s117216323
p02271
u619765879
1452962778
Python
Python
py
Runtime Error
0
0
479
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()) 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/tmpcmdokbgd/tmp4nhberwm.py", line 2 if dp[i][m]!=-1 ^ SyntaxError: expected ':'
s510800359
p02271
u619765879
1452962789
Python
Python
py
Runtime Error
0
0
485
def solve(i, m): if dp[i][m] is not -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()) 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/tmpfzw6xnbc/tmp073knpqm.py", line 2 if dp[i][m] is not -1 ^ SyntaxError: expected ':'
s936718483
p02271
u619765879
1452962974
Python
Python
py
Runtime Error
0
0
482
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()) 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/tmp81jlmlqh/tmpepdqa48z.py", line 31 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s768407857
p02271
u619765879
1452962997
Python
Python
py
Runtime Error
0
0
493
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 = [][] 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/tmpqtjmff_d/tmpwps1htud.py", line 25 dp = [][] ^ SyntaxError: invalid syntax
s543922373
p02271
u619765879
1452963038
Python
Python
py
Runtime Error
0
0
491
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 = [] 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/tmpubm7kliv/tmptzvojalk.py", line 33 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s428356250
p02271
u619765879
1452963161
Python
Python
py
Runtime Error
0
0
493
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 = [[]] 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/tmpy4krudln/tmpewsd716b.py", line 33 print 'yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?