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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s916364681 | p00024 | u378480414 | 1397062210 | Python | Python | py | Runtime Error | 0 | 0 | 73 | import sys,math
for v in sys.stdin:
print int(math.ceil(v**2/2/9.8/5))+1 | File "/tmp/tmpj0opihpy/tmpllf03h7t.py", line 3
print int(math.ceil(v**2/2/9.8/5))+1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s998855208 | p00025 | u883062308 | 1438593490 | Python | Python3 | py | Runtime Error | 0 | 0 | 327 | import sys
for line in sys.stdin:
hit = 0
blow = 0
a_nums = line.split()
for i_b, b in input().split():
try:
i = a_nums.index(b)
if i == i_b:
hit += 1
else:
blow += 1
except ValueError:
continue
print(hit, blow) | ||
s000692820 | p00025 | u203261375 | 1466907143 | Python | Python | py | Runtime Error | 0 | 0 | 369 | import sys
for i in sys.stdin:
arrA,arrB = [],[]
s = i.split()
for i in s:
arrA.append(int(i))
s = input().split()
for i in s:
arrB.append(int(i))
h,b = 0,0
for i in range(len(arrA)):
if arrA[i] == arrB[i]:
h += 1
else:
if arrB.count(arrA[i]) > 0:
b += 1
print(h,b) | ||
s039467687 | p00025 | u300946041 | 1468670100 | Python | Python3 | py | Runtime Error | 0 | 0 | 432 | # -*- coding: utf-8 -*-
def main(a, b):
hit = 0
blow = 0
for a_e, b_e in zip(a, b):
if a_e == b_e:
hit += 1
elif a_e in b:
blow += 1
print(hit, blow, sep=' ')
if __name__ == '__main__':
while True:
a = [int(e) for e in input().split()]
b = [int(e) for e in input().split()]
if a and b:
main(a, b)
else:
exit() | Traceback (most recent call last):
File "/tmp/tmpd3_ci0bi/tmprkhmag5a.py", line 19, in <module>
a = [int(e) for e in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s430093148 | p00025 | u146816547 | 1469983224 | Python | Python | py | Runtime Error | 0 | 0 | 223 | while True:
a = map(int, raw_input().split())
b = map(int, raw_input().split())
hit = 0
blow = 0
for i in range(4):
if(a[i] == b[i]):
hit += 1
elif(a[i] in b):
blow += 1
print hit, blow | File "/tmp/tmpu901tqy_/tmpbofgdl6y.py", line 17
print hit, blow
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s815554927 | p00025 | u146816547 | 1469983460 | Python | Python | py | Runtime Error | 0 | 0 | 225 | while True:
a = map(int, raw_input().split(' '))
b = map(int, raw_input().split(' '))
hit = blow = 0
for i in range(4):
if(a[i] == b[i]):
hit += 1
elif(a[i] in b):
blow += 1
print hit, blow | File "/tmp/tmp3ip315ko/tmpsd8vjx5z.py", line 16
print hit, blow
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s992629157 | p00025 | u146816547 | 1469983707 | Python | Python | py | Runtime Error | 0 | 0 | 279 | while True:
try:
a = map(int, raw_input().split(' '))
b = map(int, raw_input().split(' '))
hit = blow = 0
for i in range(4):
if(a[i] == b[i]):
hit += 1
elif(a[i] in b):
blow += 1
print hit, blow
except EOFError:
break | File "/tmp/tmpyai3u_74/tmp1k4o6ius.py", line 16
print hit, blow
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s204349428 | p00025 | u776559258 | 1481164491 | Python | Python3 | py | Runtime Error | 0 | 0 | 235 | a=[int(i) for i in input().split()]
while True:
hit=0
blow=0
try:
b=[int(i) for i in input().split()]
blow=len(set(a)&set(b))
for i,j for in zip(a,b):
if i==j:
hit+=1
print(hit,blow-hit)
except EOFError:
break | File "/tmp/tmpm1j0sqpj/tmpp78_9_14.py", line 8
for i,j for in zip(a,b):
^^^
SyntaxError: invalid syntax
| |
s402333650 | p00025 | u776559258 | 1481164605 | Python | Python3 | py | Runtime Error | 0 | 0 | 234 | a=[int(i) for i in input().split()]
while True:
hit=0
blow=0
b=[int(i) for i in input().split()]
try:
blow=len(set(a)&set(b))
for i,j for in zip(a,b):
if i==j:
hit+=1
print(hit,blow-hit)
except EOFError:
break | File "/tmp/tmpj8j9m356/tmp6npo8rvh.py", line 8
for i,j for in zip(a,b):
^^^
SyntaxError: invalid syntax
| |
s939858496 | p00025 | u776559258 | 1481164769 | Python | Python3 | py | Runtime Error | 0 | 0 | 237 | while True:
hit=0
blow=0
try:
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
blow=len(set(a)&set(b))
for i,j for in zip(a,b):
if i==j:
hit+=1
print(hit,blow-hit)
except EOFError:
break | File "/tmp/tmp9_jkxcge/tmpgp6eg4vn.py", line 8
for i,j for in zip(a,b):
^^^
SyntaxError: invalid syntax
| |
s472388777 | p00025 | u811733736 | 1481616617 | Python | Python3 | py | Runtime Error | 0 | 0 | 670 | import sys
if __name__ == '__main__':
data = []
for line in sys.stdin:
data.append([int(x) for x in line.split(' ')])
if len(data) == 2:
choice_a = data[0]
choice_b = data[1]
data = []
#print(choice_a)
#print(choice_b)
# hit&blow?????????
hit = 0
blow = 0
for i, d in enumerate(choice_a):
if d in choice_b:
if d == choice_b[i]:
hit += 1
else:
blow += 1
# ???????????¨???
print('{0} {1}'.format(hit, blow)) | ||
s198645196 | p00025 | u905313459 | 1496467296 | Python | Python3 | py | Runtime Error | 0 | 0 | 200 | import sys
v = iter(sys.stdin.readlines())
for i, j in v, v:
a, b = list(i.sprit()), list(j.split())
k = len([n for n in a for m in b if n == m])
l = len(set(a) & set(b))
print(l, k-l) | Traceback (most recent call last):
File "/tmp/tmpq4tytqnj/tmp0awhgc37.py", line 3, in <module>
for i, j in v, v:
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s734621564 | p00025 | u498511622 | 1501554778 | Python | Python3 | py | Runtime Error | 0 | 0 | 241 | while True:
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))
hit=blow=0
for i in l1:
for s in l2:
if i==s:
if l1.index(i)==l2.index(s):
hit+=1
else:
blow+=1
print(hit,blow)
| Traceback (most recent call last):
File "/tmp/tmpxbysi4xy/tmprgkjwr5x.py", line 2, in <module>
l1=list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s311863231 | p00025 | u821624310 | 1502787445 | Python | Python3 | py | Runtime Error | 0 | 0 | 325 | import fileinput
for line in fileinput.input():
a = line.split()
b = input().split()
hit = 0
blow = 0
for i in range(4):
for j in range(4):
if a[i] == b[j]:
if i == j:
hit += 1
else:
blow += 1
print(hit, blow) | ||
s191233412 | p00025 | u821624310 | 1502787655 | Python | Python3 | py | Runtime Error | 0 | 0 | 325 | import fileinput
for line in fileinput.input():
a = line.split()
b = input().split()
hit = 0
blow = 0
for i in range(4):
for j in range(4):
if a[i] == b[j]:
if i == j:
hit += 1
else:
blow += 1
print(hit, blow) | ||
s115013488 | p00025 | u011621222 | 1509746522 | Python | Python3 | py | Runtime Error | 0 | 0 | 1115 | import sys
import numpy as np
def main():
input_line = []
# test_line = ['9 1 8 2', '4 1 5 9', '4 6 8 2', '4 6 3 2']
# for line in test_line:
# input_line.append(line.split())
for line in sys.stdin:
input_line.append(line.split())
#print(input_line)
for i in range(0,len(input_line),2):
#hit number
arrary1 = np.array(input_line[i], dtype=float)
arrary2 = np.array(input_line[i+1], dtype=float)
hit_vec = arrary1 - arrary2
hit_list = list(hit_vec)
hitnumber = hit_list.count(0.)
#print(hit_list.count(0.))
#blow number
#get the hit location and remove
hit_loc = [i for i,x in enumerate(hit_list) if x == 0]
blow_vec1 = np.delete(arrary1, hit_loc)
blow_vec2 = np.delete(arrary2, hit_loc)
blownumber = len(set(blow_vec1).intersection(blow_vec2))
#print(len(set(blow_vec1).intersection(blow_vec2)))
print(hitnumber,blownumber)
if __name__ == '__main__':
main() | ||
s540226221 | p00025 | u150984829 | 1516989538 | Python | Python3 | py | Runtime Error | 0 | 0 | 140 | import sys
e=iter(map(lambda a:a.split(),sys.stdin))
for a,b in zip(e,e):
h=0;for s,t in zip(a,b):h+=s==t
print(h,4-len(set(a)-set(b))-h)
| File "/tmp/tmpy9rhpfl0/tmp3lr49tyw.py", line 4
h=0;for s,t in zip(a,b):h+=s==t
^^^
SyntaxError: invalid syntax
| |
s970361845 | p00025 | u150984829 | 1516989764 | Python | Python3 | py | Runtime Error | 0 | 0 | 137 | import sys
e=iter(sys.stdin)
for a,b in zip(e,e):
a,b=a.split(),b.split()
for s,t in zip(a,b):h+=s==t
print(h,4-len(set(a)-set(b))-h)
| ||
s513603855 | p00025 | u553148578 | 1523839446 | Python | Python3 | py | Runtime Error | 0 | 0 | 215 | while 1:
hit = blow = 0
try: a = [*map(int,input().split(' '))]
except: break
b = [*map(int,input().split(' '))]
for i in range(len(a)):
if a[i] == b[i]:
hit += 1
if a[i] == b[i-1]:
blow += 1
print(hit, blow)
| File "/tmp/tmpr66frgip/tmpzpuxezif.py", line 2
hit = blow = 0
^
IndentationError: expected an indented block after 'while' statement on line 1
| |
s058885230 | p00025 | u553148578 | 1523839478 | Python | Python3 | py | Runtime Error | 0 | 0 | 215 | while 1:
hit = blow = 0
try: a = [*map(int,input().split(' '))]
except: break
b = [*map(int,input().split(' '))]
for i in range(len(a)):
if a[i] == b[i]:
hit += 1
if a[i] == b[i-1]:
blow += 1
print(hit, blow)
| File "/tmp/tmpza9rzrfx/tmpb6iofd8c.py", line 2
hit = blow = 0
^
IndentationError: expected an indented block after 'while' statement on line 1
| |
s502985271 | p00025 | u553148578 | 1523839702 | Python | Python3 | py | Runtime Error | 0 | 0 | 167 | a = [*map(int,input().split(' '))]
b = [*map(int,input().split(' '))]
for i in range(4):
if a[i] == b[i]:
hit += 1
if a[i] == b[i-1]:
blow += 1
print(hit, blow)
| Traceback (most recent call last):
File "/tmp/tmp520530yc/tmptn5379xj.py", line 1, in <module>
a = [*map(int,input().split(' '))]
^^^^^^^
EOFError: EOF when reading a line
| |
s956357855 | p00025 | u553148578 | 1523840521 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | hit = blow = 0
a = [*map(int,input().split(' '))]
b = [*map(int,input().split(' '))]
for i in range(4):
if a[i] == b[i]:
hit += 1
elif a[i] == b[i-1]:
blow += 1
print(hit, blow)
| File "/tmp/tmppxnwoc9a/tmpkfl54am0.py", line 7
elif a[i] == b[i-1]:
^^^^
SyntaxError: invalid syntax
| |
s043797620 | p00025 | u553148578 | 1523840943 | Python | Python3 | py | Runtime Error | 0 | 0 | 171 | a = [*map(int,input().split(' '))]
b = [*map(int,input().split(' '))]
for i in range(4):
if a[i] == b[i]:
hit += 1
elif a[i] == b[i-1]:
blow += 1
print(hit, blow)
| File "/tmp/tmpxhmj3h_j/tmp109w9bcs.py", line 6
elif a[i] == b[i-1]:
^^^^
SyntaxError: invalid syntax
| |
s840681163 | p00025 | u898097781 | 1525325876 | Python | Python3 | py | Runtime Error | 0 | 0 | 228 | while True:
hit = 0
blow = 0
a = input().split(' ')
b = input().split(' ')
for a_, b_ in zip(a, b):
if a_ == b_:
hit += 1
elif a_ in b:
blow += 1
print(hit, blow)
| Traceback (most recent call last):
File "/tmp/tmpx54xbmb8/tmpg1tyg_e1.py", line 4, in <module>
a = input().split(' ')
^^^^^^^
EOFError: EOF when reading a line
| |
s449516302 | p00025 | u898097781 | 1525325900 | Python | Python3 | py | Runtime Error | 0 | 0 | 226 | while(1):
hit = 0
blow = 0
a = input().split(' ')
b = input().split(' ')
for a_, b_ in zip(a, b):
if a_ == b_:
hit += 1
elif a_ in b:
blow += 1
print(hit, blow)
| Traceback (most recent call last):
File "/tmp/tmpyrp80hzy/tmpig7l4o3x.py", line 4, in <module>
a = input().split(' ')
^^^^^^^
EOFError: EOF when reading a line
| |
s435272858 | p00025 | u138224929 | 1526549832 | Python | Python3 | py | Runtime Error | 0 | 0 | 578 | import sys
ans = []
for line in sys.stdin:
aa = list(map(int,input().split()))
bb = list(map(int,input().split()))
hit = 0
blow = 0
for one in range(len(aa)):
if aa[i] == bb[i]:
hit += 1
for one_a in range(len(aa)):
ai = aa[one_a]
for one_b in range(len(bb)):
bi = bb[one_b]
if ai== bi and one_a != one_b:
blow += 1
one_list = [hit,blow]
ans.append(one_list)
for i in range(len(ans)):
print(str(ans[i][0]) + ' ' + str(ans[i][1]))
| ||
s010852013 | p00025 | u138224929 | 1526550569 | Python | Python3 | py | Runtime Error | 0 | 0 | 584 | import sys
ans = []
for line in sys.stdin:
aa = list(map(int,input().split()))
bb = list(map(int,input().split()))
hit = 0
blow = 0
for one in range(len(aa)):
if aa[i] == bb[i]:
hit += 1
for one_a in range(len(aa)):
ai = aa[one_a]
for one_b in range(len(bb)):
bi = bb[one_b]
if ai== bi and one_a != one_b:
blow += 1
one_list = [hit,blow]
ans.append(one_list)
for i in range(len(ans)):
print(str(ans[i][0]) + ' ' + str(ans[i][1]) + ' ')
| ||
s861371756 | p00025 | u138224929 | 1526550603 | Python | Python3 | py | Runtime Error | 0 | 0 | 557 | import sys
ans = []
for line in sys.stdin:
aa = list(map(int,input().split()))
bb = list(map(int,input().split()))
hit = 0
blow = 0
for one in range(len(aa)):
if aa[i] == bb[i]:
hit += 1
for one_a in range(len(aa)):
ai = aa[one_a]
for one_b in range(len(bb)):
bi = bb[one_b]
if ai== bi and one_a != one_b:
blow += 1
one_list = [hit,blow]
ans.append(one_list)
for i in range(len(ans)):
print(str(ans[i][0]) + ' ' + str(ans[i][1]))
| ||
s512301255 | p00025 | u735362704 | 1355240622 | Python | Python | py | Runtime Error | 0 | 0 | 630 | #!/usr/bin/env python
# coding: utf-8
def hit_and_blow(a, b):
hits = 0
blows = 0
for i in xrange(4):
if b[i] == a[i]:
hits += 1
else:
for j in xrange(4):
if j == i:
continue
if b[i] == a[j]:
blows += 1
return hits, blows
def main():
while 1:
try:
a = [int(x) for x in raw_input().split(" ")]
b = [int(x) for x in raw_input().split(" ")]
except EOFError:
return
print "%d %d" % hit_and_blow(a, b)
if __name__ == '__main__':
main() | File "/tmp/tmpdsqi6c0q/tmpz2jzei_c.py", line 27
print "%d %d" % hit_and_blow(a, b)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s786510174 | p00025 | u735362704 | 1355240807 | Python | Python | py | Runtime Error | 0 | 0 | 630 | #!/usr/bin/env python
# coding: utf-8
def hit_and_blow(a, b):
hits = 0
blows = 0
for i in xrange(4):
if b[i] == a[i]:
hits += 1
else:
for j in xrange(4):
if j == i:
continue
if b[i] == a[j]:
blows += 1
return hits, blows
def main():
while 1:
try:
a = [int(x) for x in raw_input().split(" ")]
b = [int(x) for x in raw_input().split(" ")]
except EOFError:
return
print "%d %d" % hit_and_blow(a, b)
if __name__ == '__main__':
main() | File "/tmp/tmpu5wfcj4z/tmpf6zfqo2o.py", line 27
print "%d %d" % hit_and_blow(a, b)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s179462533 | p00025 | u735362704 | 1355241351 | Python | Python | py | Runtime Error | 0 | 0 | 604 | #!/usr/bin/env python
# coding: utf-8
def hit_and_blow(a, b):
hits = 0
blows = 0
for i in xrange(4):
if b[i] == a[i]:
hits += 1
else:
for j in xrange(4):
if j == i:
continue
if b[i] == a[j]:
blows += 1
return hits, blows
def main():
try:
a = [int(x) for x in raw_input().split(" ")]
b = [int(x) for x in raw_input().split(" ")]
except EOFError:
return
print "%d %d" % hit_and_blow(a, b)
main()
if __name__ == '__main__':
main() | File "/tmp/tmphhv8i63a/tmp1383shz7.py", line 26
print "%d %d" % hit_and_blow(a, b)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s175869056 | p00025 | u735362704 | 1355241575 | Python | Python | py | Runtime Error | 0 | 0 | 628 | #!/usr/bin/env python
# coding: utf-8
def hit_and_blow(a, b):
hits = 0
blows = 0
for i in xrange(4):
if b[i] == a[i]:
hits += 1
else:
for j in xrange(4):
if j == i:
continue
if b[i] == a[j]:
blows += 1
return hits, blows
def main():
while 1:
try:
a = [int(x) for x in raw_input().split(" ")]
b = [int(x) for x in raw_input().split(" ")]
except EOFError:
pass
print "%d %d" % hit_and_blow(a, b)
if __name__ == '__main__':
main() | File "/tmp/tmpyhiv9a_e/tmpoyw2j76n.py", line 27
print "%d %d" % hit_and_blow(a, b)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s818730877 | p00025 | u735362704 | 1355241910 | Python | Python | py | Runtime Error | 0 | 0 | 611 | #!/usr/bin/env python
# coding: utf-8
def hit_and_blow(a, b):
hits = 0
blows = 0
for i in xrange(4):
if b[i] == a[i]:
hits += 1
else:
for j in xrange(4):
if j == i:
continue
if b[i] == a[j]:
blows += 1
return hits, blows
def main():
inputs = []
while 1:
try:
inputs.append([int(x) for x in raw_input().split(" ")])
except EOFError:
break
print "%d %d" % hit_and_blow(inputs[0], inputs[1])
if __name__ == '__main__':
main() | File "/tmp/tmpmmsa4wma/tmp_rrur678.py", line 27
print "%d %d" % hit_and_blow(inputs[0], inputs[1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s517265064 | p00025 | u735362704 | 1355242194 | Python | Python | py | Runtime Error | 0 | 0 | 727 | #!/usr/bin/env python
# coding: utf-8
def hit_and_blow(a, b):
hits = 0
blows = 0
for i in xrange(4):
if b[i] == a[i]:
hits += 1
else:
for j in xrange(4):
if j == i:
continue
if b[i] == a[j]:
blows += 1
return hits, blows
def main():
inputs = []
while 1:
try:
inputs.append([int(x) for x in raw_input().split(" ")])
except EOFError:
break
quads = []
for quad in inputs:
quads.append(quad)
if quads.__len__() == 2:
print "%d %d" % hit_and_blow(*quads)
quads = []
if __name__ == '__main__':
main() | File "/tmp/tmpt13txzbt/tmpjmcntv49.py", line 31
print "%d %d" % hit_and_blow(*quads)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s673698462 | p00025 | u735362704 | 1355242679 | Python | Python | py | Runtime Error | 0 | 0 | 630 | #!/usr/bin/env python
# coding: utf-8
def hit_and_blow(a, b):
hits = 0
blows = 0
for i in xrange(4):
if b[i] == a[i]:
hits += 1
else:
for j in xrange(4):
if j == i:
continue
if b[i] == a[j]:
blows += 1
return hits, blows
def main():
while 1:
try:
a = [int(x) for x in raw_input().split(" ")]
b = [int(x) for x in raw_input().split(" ")]
except EOFError:
return
print "%d %d" % hit_and_blow(a, b)
if __name__ == '__main__':
main() | File "/tmp/tmpq__ldmnf/tmp9zcyjq03.py", line 27
print "%d %d" % hit_and_blow(a, b)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s243297009 | p00025 | u735362704 | 1355243624 | Python | Python | py | Runtime Error | 0 | 0 | 625 | #!/usr/bin/env python
# coding: utf-8
def hit_and_blow(a, b):
hits = 0
blows = 0
for i in xrange(4):
if b[i] == a[i]:
hits += 1
else:
for j in xrange(4):
if j == i:
continue
if b[i] == a[j]:
blows += 1
return hits, blows
def main():
while 1:
try:
a = [int(x) for x in raw_input().split(" ")]
except EOFError:
break
b = [int(x) for x in raw_input().split(" ")]
print "%d %d" % hit_and_blow(a, b)
if __name__ == '__main__':
main() | File "/tmp/tmpov8h_rw2/tmpb12ochn7.py", line 27
print "%d %d" % hit_and_blow(a, b)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s016175755 | p00025 | u647766105 | 1355466265 | Python | Python | py | Runtime Error | 0 | 5424 | 222 | while True:
a=map(int,raw_input().split())
if not a:break
b=map(int,raw_input().split())
hit,blow=0,0
for i in range(4):
if a[i]==b[i]:hit+=1
if a[i] in b :blow+=1
print hit,blow-hit | File "/tmp/tmpwp2_mwp5/tmpiirprqu3.py", line 9
print hit,blow-hit
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s731079671 | p00025 | u504990413 | 1355565898 | Python | Python | py | Runtime Error | 0 | 0 | 423 |
while True:
try:
listA = map(int,raw_input().split(' '))
listB = map(int,raw_input().split(' '))
hit=0
blw=0
for tB in listB:
if (tB in listA) and (listB.index(tB) == listA.index(tB)):
hit += 1
elif (tB in listA) and (listB.index(tB) != listA.index(tB)):
blw += 1
print hit,blw
except EOFError:
break | File "/tmp/tmpmukhoscm/tmpfxszolr1.py", line 14
print hit,blw
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s648126187 | p00025 | u350508326 | 1368532827 | Python | Python | py | Runtime Error | 0 | 0 | 508 | if __name__ == "__main__":
while True:
try:
hit = 0
br = 0
a = map(int,raw_input().split(' '))
b = map(int,raw_input().split(' '))
for i in range(4):
for j in range(4):
if a[i] == b[j]:
print a[i],b[j]
hit += 1
elif a[i] == b[j]:
br += 1
print hit,br
except EOFError:
break | File "/tmp/tmp5hikfwyp/tmp7rsspkbn.py", line 12
print a[i],b[j]
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s049097663 | p00025 | u350508326 | 1368532849 | Python | Python | py | Runtime Error | 0 | 0 | 481 | while True:
try:
hit = 0
br = 0
a = map(int,raw_input().split(' '))
b = map(int,raw_input().split(' '))
for i in range(4):
for j in range(4):
if a[i] == b[j]:
print a[i],b[j]
hit += 1
elif a[i] == b[j]:
br += 1
print hit,br
except EOFError:
break | File "/tmp/tmp4p0jwoj0/tmp6j0082n3.py", line 1
while True:
IndentationError: unexpected indent
| |
s149719047 | p00025 | u350508326 | 1368533138 | Python | Python | py | Runtime Error | 0 | 0 | 493 | if __name__ == "__main__":
while True:
try:
hit = 0
br = 0
a = map(int,raw_input().split(' '))
b = map(int,raw_input().split(' '))
for i in range(4):
for j in range(4):
if a[i] == b[j]:
hit += 1
elif a[i] == b[j]:
br += 1
print hit,br
except EOFError:
break | File "/tmp/tmpm9ffqma0/tmpbvn6v3eb.py", line 18
print hit,br
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s911340863 | p00025 | u350508326 | 1368533379 | Python | Python | py | Runtime Error | 0 | 0 | 411 | while True:
try:
hit = 0
br = 0
a = map(int,raw_input().split(' '))
b = map(int,raw_input().split(' '))
for i in range(4):
for j in range(4):
if a[i] == b[j]:
if i == j:
hit += 1
else:
br += 1
print hit,br
except EOFError:
break | File "/tmp/tmp8faxcxxy/tmpnw4ni9_4.py", line 16
print hit,br
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s071707942 | p00025 | u511257811 | 1382282469 | Python | Python | py | Runtime Error | 0 | 0 | 362 | import sys
for lineCnt, line in enumerate(sys.stdin):
if lineCnt % 2 == 0:
a = map(int, line.split(' '))
continue
else:
b = map(int, line.split(' '))
hit = blow = 0
for i, na in enumerate(a):
if b[i] == na:
hit += 1
elif na in b:
blow += 1
print '%d %d' % (hit, blow) | File "/tmp/tmpy7my47lw/tmp59qf7c1h.py", line 16
print '%d %d' % (hit, blow)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s817161690 | p00025 | u511257811 | 1382282617 | Python | Python | py | Runtime Error | 0 | 0 | 363 | import sys
for lineCnt, line in enumerate(sys.stdin):
if lineCnt % 2 == 0:
a = map(int, line.split(' '))
continue
else:
b = map(int, line.split(' '))
hit, blow = 0,0
for i, na in enumerate(a):
if b[i] == na:
hit += 1
elif na in b:
blow += 1
print '%d %d' % (hit, blow) | File "/tmp/tmpgyhvdu96/tmp_dbhr94t.py", line 16
print '%d %d' % (hit, blow)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s649991511 | p00026 | u553148578 | 1531538579 | Python | Python3 | py | Runtime Error | 0 | 0 | 630 | paper = {}
counter = 0
for i in range(10):
for j in range(10):
paper.update({(i,j):0})
while True:
try:
x, y, s = list(map(int,input().split(",")))
except:
break
if s == 3:
paper[(x+2,y)] += 1
paper[(x-2,y)] += 1
paper[(x,y+2)] += 1
paper[(x,y-2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x+1,y-1)] += 1
paper[(x-1,y+1)] += 1
paper[(x-1,y-1)] += 1
paper[(x,y)] += 1
paper[(x,y-1)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
paper[(x-1,y)] += 1
#print(paper.values())
for i in range(10):
for j in range(10):
if paper[(i,j)] == 0:
counter += 1
print(counter)
print(max(paper.values()))
| 100
0
| |
s998668301 | p00026 | u553148578 | 1531538946 | Python | Python3 | py | Runtime Error | 0 | 0 | 622 | paper = {}
counter = 0
i = 0
for i in range(10):
for j in range(10):
paper.update({(i,j):0})
while i < 50:
try:
x, y, s = list(map(int,input().split(",")))
except:
break
if s == 3:
paper[(x+2,y)] += 1
paper[(x-2,y)] += 1
paper[(x,y+2)] += 1
paper[(x,y-2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x+1,y-1)] += 1
paper[(x-1,y+1)] += 1
paper[(x-1,y-1)] += 1
paper[(x,y)] += 1
paper[(x,y-1)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
paper[(x-1,y)] += 1
i += 1
for i in range(10):
for j in range(10):
if paper[(i,j)] == 0:
counter += 1
print(counter)
print(max(paper.values()))
| 100
0
| |
s467616624 | p00026 | u553148578 | 1531784565 | Python | Python3 | py | Runtime Error | 0 | 0 | 890 | paper = {}
counter = 0
i = 0
for i in range(10):
for j in range(10):
paper.update({(i,j):0})
while i < 50:
try:
x, y, s = list(map(int,input().split(",")))
except:
break
if x - 1 < 0 and x - 2 < 0 and x - 3 < 0 and y - 1 < 0 and y - 2 < 0 and y - 3 < 0:
if s == 3:
paper[(x+2,y)] += 1
paper[(x,y+2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x,y)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
else:
if s == 3:
paper[(x+2,y)] += 1
paper[(x-2,y)] += 1
paper[(x,y+2)] += 1
paper[(x,y-2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x+1,y-1)] += 1
paper[(x-1,y+1)] += 1
paper[(x-1,y-1)] += 1
paper[(x,y)] += 1
paper[(x,y-1)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
paper[(x-1,y)] += 1
i += 1
for i in range(10):
for j in range(10):
if paper[(i,j)] == 0:
counter += 1
print(counter)
print(max(paper.values()))
| 100
0
| |
s436020900 | p00026 | u553148578 | 1531785262 | Python | Python3 | py | Runtime Error | 0 | 0 | 1448 | paper = {}
counter = 0
i = 0
for i in range(10):
for j in range(10):
paper.update({(i,j):0})
while i < 50:
try:
x, y, s = list(map(int,input().split(",")))
except:
break
if x - 1 < 0 and x - 2 < 0 and x - 3 < 0 and y - 1 < 0 and y - 2 < 0 and y - 3 < 0:
if s == 3:
paper[(x+2,y)] += 1
paper[(x,y+2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x,y)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
elif x - 1 < 0 and x - 2 < 0 and x - 3 < 0:
if s == 3:
paper[(x+2,y)] += 1
paper[(x,y+2)] += 1
paper[(x,y-2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x+1,y-1)] += 1
paper[(x,y)] += 1
paper[(x,y-1)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
elif y - 1 < 0 and y - 2 < 0 and y - 3 < 0:
if s == 3:
paper[(x+2,y)] += 1
paper[(x-2,y)] += 1
paper[(x,y+2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x-1,y+1)] += 1
paper[(x,y)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
paper[(x-1,y)] += 1
else:
if s == 3:
paper[(x+2,y)] += 1
paper[(x-2,y)] += 1
paper[(x,y+2)] += 1
paper[(x,y-2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x+1,y-1)] += 1
paper[(x-1,y+1)] += 1
paper[(x-1,y-1)] += 1
paper[(x,y)] += 1
paper[(x,y-1)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
paper[(x-1,y)] += 1
i += 1
for i in range(10):
for j in range(10):
if paper[(i,j)] == 0:
counter += 1
print(counter)
print(max(paper.values()))
| 100
0
| |
s199498812 | p00026 | u553148578 | 1531785315 | Python | Python3 | py | Runtime Error | 0 | 0 | 1439 | paper = {}
counter = 0
i = 0
for i in range(10):
for j in range(10):
paper.update({(i,j):0})
while i < 50:
try:
x, y, s = list(map(int,input().split(",")))
except:
break
if x - 1 < 0 or x - 2 < 0 or x - 3 < 0 or y - 1 < 0 or y - 2 < 0 or y - 3 < 0:
if s == 3:
paper[(x+2,y)] += 1
paper[(x,y+2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x,y)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
elif x - 1 < 0 or x - 2 < 0 or x - 3 < 0:
if s == 3:
paper[(x+2,y)] += 1
paper[(x,y+2)] += 1
paper[(x,y-2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x+1,y-1)] += 1
paper[(x,y)] += 1
paper[(x,y-1)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
elif y - 1 < 0 or y - 2 < 0 or y - 3 < 0:
if s == 3:
paper[(x+2,y)] += 1
paper[(x-2,y)] += 1
paper[(x,y+2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x-1,y+1)] += 1
paper[(x,y)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
paper[(x-1,y)] += 1
else:
if s == 3:
paper[(x+2,y)] += 1
paper[(x-2,y)] += 1
paper[(x,y+2)] += 1
paper[(x,y-2)] += 1
if s >= 2:
paper[(x+1,y+1)] += 1
paper[(x+1,y-1)] += 1
paper[(x-1,y+1)] += 1
paper[(x-1,y-1)] += 1
paper[(x,y)] += 1
paper[(x,y-1)] += 1
paper[(x,y+1)] += 1
paper[(x+1,y)] += 1
paper[(x-1,y)] += 1
i += 1
for i in range(10):
for j in range(10):
if paper[(i,j)] == 0:
counter += 1
print(counter)
print(max(paper.values()))
| 100
0
| |
s572376633 | p00026 | u193025715 | 1408263964 | Python | Python3 | py | Runtime Error | 0 | 0 | 812 | paper = [0 for i in range(100)]
white_points = None
deep_points = None
def small(x, y):
p = [[x, y]]
for i, j in zip([-1, 0, 1, 0], [0, -1, 0, 1]):
p.append([x + i, y + j])
return p
def middle(x, y):
p = small(x, y)
for i, j in zip([1, -1] * 2, [1, 1, -1, -1]):
p.append([x + i, y + j])
return p
def big(x, y):
p = middle(x, y)
for i, j in zip([-2, 0, 2, 0], [0, -2, 0, 2]):
p.append([x + i, y + j])
return p
while True:
try:
x, y, size = map(int, input().split(','))
except:
print(paper.count(0))
print(max(paper))
break
if size == 1:
bp = small(x, y)
elif size == 2:
bp = middle(x, y)
elif size == 3:
bp = big(x, y)
for p in bp:
paper[p[0] * 10 + p[1]] += 1 | 100
0
| |
s196758270 | p00026 | u193025715 | 1408265205 | Python | Python3 | py | Runtime Error | 0 | 0 | 868 | paper = [0 for i in range(100)]
white_points = None
deep_points = None
def small(x, y):
p = [[x, y]]
for i, j in zip([-1, 0, 1, 0], [0, -1, 0, 1]):
p.append([x + i, y + j])
return p
def middle(x, y):
p = small(x, y)
for i, j in zip([1, -1, 1, -1], [1, 1, -1, -1]):
p.append([x + i, y + j])
return p
def big(x, y):
p = middle(x, y)
for i, j in zip([-2, 0, 2, 0], [0, -2, 0, 2]):
p.append([x + i, y + j])
return p
while True:
try:
x, y, size = map(int, input().split(','))
except:
print(paper.count(0))
print(max(paper))
break
if size == 1:
bp = small(x, y)
elif size == 2:
bp = middle(x, y)
elif size == 3:
bp = big(x, y)
for p in bp:
if not 0 <= p[0] * 10 + p[1] <= 99: continue
paper[p[1] * 10 + p[0]] += 1 | 100
0
| |
s219967375 | p00026 | u879226672 | 1424700282 | Python | Python | py | Runtime Error | 0 | 0 | 1057 | # -*- coding: utf-8 -*-
def density_adder(array,x,y,delta_list):
for dx,dy in zip(delta_list):
cell_num = 10*(x-dx) + (y-dy)
if 0 <= cell_num <=100:
array[10*x + y][2] += 1
while True:
array = [[i,j,0] for i in range(10)
for j in range(10)]
try:
x,y,size = map(int,raw_input().split())
except EOFError:
break
small_delta_ls = [(0,0),(-1,0),(1,0),(0,-1),(0,1)]
medium_delta_ls = small_delta_ls + [(1,1),(1,-1),(-1,1),(-1,-1)]
large_delta_ls = medium_delta_ls + [(-2,0),(2,0),(0,2),(0,-2)]
if size == 1: # Small
density_adder(array,x,y,small_delta_ls)
elif size == 2: # Medium
density_adder(array,x,y,medium_delta_ls)
elif size ==3 : # Large
density_adder(array,x,y,large_delta_ls)
ink_zero = 0
densest = 0
for k in xrange(100):
if array[k][2]==0:
ink_zero +=1
if array[k][2] > densest:
densest = array[k][2]
print ink_zero
print densest | File "/tmp/tmpp_jmhe5l/tmplwalzfa9.py", line 36
print ink_zero
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s246071937 | p00026 | u879226672 | 1424701168 | Python | Python | py | Runtime Error | 0 | 0 | 1120 | # -*- coding: utf-8 -*-
def density_adder(array,x,y,delta_list):
for k in delta_list:
dx,dy = k
cell_num = 10*(x-dx) + (y-dy)
if 0 <= cell_num <100:
array[10*x + y][2] += 1
array = [[i,j,0] for i in range(10)
for j in range(10)]
input_list = []
while True:
x,y,size = map(int,raw_input().split(","))
input_list.append((x,y,size))
else:
small_delta_ls = [(0,0),(-1,0),(1,0),(0,-1),(0,1)]
medium_delta_ls = small_delta_ls + [(1,1),(1,-1),(-1,1),(-1,-1)]
large_delta_ls = medium_delta_ls + [(-2,0),(2,0),(0,2),(0,-2)]
for j in input_list:
x,y,size = j
if size == 1: # Small
density_adder(array,x,y,small_delta_ls)
elif size == 2: # Medium
density_adder(array,x,y,medium_delta_ls)
elif size ==3 : # Large
density_adder(array,x,y,large_delta_ls)
ink_zero = 0
densest = 0
for k in xrange(100):
if array[k][2]==0:
ink_zero +=1
if array[k][2] > densest:
densest = array[k][2]
print ink_zero
print densest | File "/tmp/tmpfweels0b/tmpawtf6r47.py", line 38
print ink_zero
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s212474255 | p00026 | u540744789 | 1426595536 | Python | Python | py | Runtime Error | 0 | 0 | 889 | import sys
p = [[0 for a in range(10)] for b in range(10)]
def smallink(x,y):
return [(x+i,y+j) for i in range(-1,2,1) for j in range(-1,2,1)\
if abs(i)+abs(j)<=1 and x+i>=0 and y+j>=0]
def ink(x,y):
return [(x+i,y+j) for i in range(-1,2,1) for j in range(-1,2,1)\
if x+i>=0 and y+j>=0]
def bigink(x,y):
return [(x+i,y+j) for i in range(-2,3,1) for j in range(-2,3,1)\
if abs(i)+abs(j)<=2 and x+i>=0 and y+j>=0]
for dataset in sys.stdin:
x,y,size=map(int,dataset.split(","))
if size==1:
L=smallink(x,y)
elif size==2:
L=ink(x,y)
else:
L=bigink(x,y)
while len(L)!=0:
point=L.pop(0)
p[point[0]][point[1]]+=1
count=0
max=0
for i in range(10):
for j in range(10):
if(p[i][j]>max):
max=p[i][j]
if(p[i][j]==0):
count+=1
print count
print max | File "/tmp/tmpsqa2gth_/tmpuihh81hy.py", line 33
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s721564764 | p00026 | u540744789 | 1426596149 | Python | Python | py | Runtime Error | 0 | 0 | 888 | import sys
p = [[0 for a in range(10)] for b in range(10)]
def smallink(x,y):
return [(x+i,y+j) for i in range(-1,2,1) for j in range(-1,2,1)\
if abs(i)+abs(j)<=1 and x+i>=0 and y+j>=0]
def ink(x,y):
return [(x+i,y+j) for i in range(-1,2,1) for j in range(-1,2,1)\
if x+i>=0 and y+j>=0]
def bigink(x,y):
return [(x+i,y+j) for i in range(-2,3,1) for j in range(-2,3,1)\
if abs(i)+abs(j)<=2 and x+i>=0 and y+j>=0]
for dataset in sys.stdin:
x,y,size=map(int,dataset.split(","))
if size==1:
L=smallink(x,y)
elif size==2:
L=ink(x,y)
else:
L=bigink(x,y)
while len(L)!=0:
point=L.pop(0)
p[point[0]][point[1]]+=1
count=0
max=0
for i in range(10):
for j in range(10):
if(p[i][j]>max):
max=p[i][j]
if(p[i][j]==0):
count+=1
print count
print max | File "/tmp/tmp9cz52m0t/tmpbbedsiyj.py", line 33
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s295912156 | p00026 | u560214129 | 1450504267 | Python | Python3 | py | Runtime Error | 0 | 0 | 1575 | import sys
mat=[[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0]]
for line in sys.stdin.readlines():
y, x, s=map(int,line.split(','))
c=0
max=0
if(s==1):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
elif(s==2):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
elif(s==3):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
mat[x-2][y]=mat[x-2][y]+1
mat[x+2][y]=mat[x+2][y]+1
mat[x][y+2]=mat[x][y+2]+1
mat[x][y-2]=mat[x][y-2]+1
print (mat)
for i in range(10):
for j in range(10):
if(mat[i][j]==0):
c=c+1
if(mat[i][j]>max):
max=mat[i][j]
print(c)
print(max) | Traceback (most recent call last):
File "/tmp/tmplmw11bmd/tmppj5w30z8.py", line 52, in <module>
c=c+1
^
NameError: name 'c' is not defined
| [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
|
s612295985 | p00026 | u560214129 | 1450504288 | Python | Python3 | py | Runtime Error | 0 | 0 | 1563 | import sys
mat=[[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0]]
for line in sys.stdin.readlines():
y, x, s=map(int,line.split(','))
c=0
max=0
if(s==1):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
elif(s==2):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
elif(s==3):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
mat[x-2][y]=mat[x-2][y]+1
mat[x+2][y]=mat[x+2][y]+1
mat[x][y+2]=mat[x][y+2]+1
mat[x][y-2]=mat[x][y-2]+1
for i in range(10):
for j in range(10):
if(mat[i][j]==0):
c=c+1
if(mat[i][j]>max):
max=mat[i][j]
print(c)
print(max) | Traceback (most recent call last):
File "/tmp/tmpm7j2spw_/tmpgoxnp515.py", line 51, in <module>
c=c+1
^
NameError: name 'c' is not defined
| |
s739331313 | p00026 | u560214129 | 1450504453 | Python | Python3 | py | Runtime Error | 0 | 0 | 1519 | import sys
mat=[[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0]]
c=0
max=0
for line in sys.stdin.readlines():
y, x, s=map(int,line.split(','))
if(s==1):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
elif(s==2):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
elif(s==3):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
mat[x-2][y]=mat[x-2][y]+1
mat[x+2][y]=mat[x+2][y]+1
mat[x][y+2]=mat[x][y+2]+1
mat[x][y-2]=mat[x][y-2]+1
for i in range(10):
for j in range(10):
if(mat[i][j]==0):
c=c+1
if(mat[i][j]>max):
max=mat[i][j]
print(c)
print(max) | 100
0
| |
s179246720 | p00026 | u560214129 | 1450504639 | Python | Python3 | py | Runtime Error | 0 | 0 | 1519 | import sys
mat=[[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0]]
c=0
max=0
for line in sys.stdin.readlines():
y, x, s=map(int,line.split(','))
if(s==1):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
elif(s==2):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
elif(s==3):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
mat[x-2][y]=mat[x-2][y]+1
mat[x+2][y]=mat[x+2][y]+1
mat[x][y+2]=mat[x][y+2]+1
mat[x][y-2]=mat[x][y-2]+1
for i in range(10):
for j in range(10):
if(mat[i][j]==0):
c=c+1
if(mat[i][j]>max):
max=mat[i][j]
print(c)
print(max) | 100
0
| |
s606563685 | p00026 | u560214129 | 1450505054 | Python | Python3 | py | Runtime Error | 0 | 0 | 1519 | import sys
mat=[[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0]]
c=0
max=0
for line in sys.stdin.readlines():
y, x, s=map(int,line.split(','))
if(s==1):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
elif(s==2):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
elif(s==3):
mat[x][y]=mat[x][y]+1
mat[x][y+1]=mat[x][y+1]+1
mat[x-1][y]=mat[x-1][y]+1
mat[x][y-1]=mat[x][y-1]+1
mat[x+1][y]=mat[x+1][y]+1
mat[x-1][y+1]=mat[x-1][y+1]+1
mat[x-1][y-1]=mat[x-1][y-1]+1
mat[x+1][y+1]=mat[x+1][y+1]+1
mat[x+1][y-1]=mat[x+1][y-1]+1
mat[x-2][y]=mat[x-2][y]+1
mat[x+2][y]=mat[x+2][y]+1
mat[x][y+2]=mat[x][y+2]+1
mat[x][y-2]=mat[x][y-2]+1
for i in range(10):
for j in range(10):
if(mat[i][j]==0):
c=c+1
if(mat[i][j]>max):
max=mat[i][j]
print(c)
print(max) | 100
0
| |
s503786162 | p00026 | u922871577 | 1479443259 | Python | Python | py | Runtime Error | 0 | 0 | 625 | import sys
drops = [None,
[(-1,0),(1,0),(0,-1),(0,1)],
[(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
[(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]
B = [[0 for j in xrange(10)] for i in xrange(10)]
for line in sys.stdin:
x, y, s = map(int, line.rstrip().split(','))
for dx, dy in drops[s]:
nx, ny = x+dx, y+dy
if (0 <= nx <= 9 or 0 <= ny <= 9):
B[ny][nx] += 1
emp, m = 0, 0
for i in xrange(10):
for j in xrange(10):
if B[i][j] == 0:
emp += 1
m = max(m, B[i][j])
print emp
print m | File "/tmp/tmpn_rn72re/tmpuholjz_g.py", line 23
print emp
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s183716528 | p00026 | u922871577 | 1479443414 | Python | Python | py | Runtime Error | 0 | 0 | 642 | import sys
drops = [None,
[(-1,0),(1,0),(0,-1),(0,1)],
[(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
[(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]
B = [[0 for j in xrange(10)] for i in xrange(10)]
for line in sys.stdin:
x, y, s = map(int, line.rstrip().split(','))
B[x][y] += 1
for dx, dy in drops[s]:
nx, ny = x+dx, y+dy
if (0 <= nx <= 9 or 0 <= ny <= 9):
B[ny][nx] += 1
emp, m = 0, 0
for i in xrange(10):
for j in xrange(10):
if B[i][j] == 0:
emp += 1
m = max(m, B[i][j])
print emp
print m | File "/tmp/tmpz48d1yn7/tmpdpclzrwu.py", line 24
print emp
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s371196664 | p00026 | u922871577 | 1479443442 | Python | Python | py | Runtime Error | 0 | 0 | 643 | import sys
drops = [None,
[(0,0),(-1,0),(1,0),(0,-1),(0,1)],
[(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1)],
[(0,0),(-1,0),(1,0),(0,-1),(0,1),(-1,1),(-1,-1),(1,-1),(1,1),(-2,0),(2,0),(0,-2),(0,2)]]
B = [[0 for j in xrange(10)] for i in xrange(10)]
for line in sys.stdin:
x, y, s = map(int, line.rstrip().split(','))
for dx, dy in drops[s]:
nx, ny = x+dx, y+dy
if (0 <= nx <= 9 or 0 <= ny <= 9):
B[ny][nx] += 1
emp, m = 0, 0
for i in xrange(10):
for j in xrange(10):
if B[i][j] == 0:
emp += 1
m = max(m, B[i][j])
print emp
print m | File "/tmp/tmp66yeptgk/tmpdsavnobq.py", line 23
print emp
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s738121916 | p00026 | u301729341 | 1481097288 | Python | Python3 | py | Runtime Error | 0 | 0 | 1031 | Masu = []
def access(x,y):
if x < 0 or y < 0:
return
Masu[y][x] += 1
for i in range(10):
Masu.append([0,0,0,0,0,0,0,0,0,0])
kosu = 0
komax = 0
while True:
try:
x,y,s = map(int,input().split(","))
if s == 1:
for j in range(3):
access(y +1 - j,x)
access(y,x - 1)
access(y,x + 1)
elif s == 2:
for k in range(3):
for l in range(3):
access(y + 1 - k,x + 1 -l)
elif s == 3:
for k in range(3):
for l in range(3):
access(y + 1 - k,x + 1 -l)
access(y - 2,x)
access(y + 2,x)
access(y,x + 2)
access(y,x - 2)
except (EOFError,ValueError):
for i in range(10):
kosu += Masu[i].count(0)
for j in range(10):
if komax < max(Masu[j]):
komax = max(Masu[j])
print(kosu)
print(komax)
break | 100
0
| |
s941155550 | p00026 | u301729341 | 1481097362 | Python | Python3 | py | Runtime Error | 0 | 0 | 1018 | Masu = []
def access(x,y):
if x < 0 or y < 0:
return
Masu[y][x] += 1
for i in range(10):
Masu.append([0,0,0,0,0,0,0,0,0,0])
kosu = 0
komax = 0
while True:
try:
x,y,s = map(int,input().split(","))
if s == 1:
for j in range(3):
access(y +1 - j,x)
access(y,x - 1)
access(y,x + 1)
elif s == 2:
for k in range(3):
for l in range(3):
access(y + 1 - k,x + 1 -l)
elif s == 3:
for k in range(3):
for l in range(3):
access(y + 1 - k,x + 1 -l)
access(y - 2,x)
access(y + 2,x)
access(y,x + 2)
access(y,x - 2)
except EOFError:
for i in range(10):
kosu += Masu[i].count(0)
for j in range(10):
if komax < max(Masu[j]):
komax = max(Masu[j])
print(kosu)
print(komax)
break | 100
0
| |
s756138018 | p00026 | u546285759 | 1497692004 | Python | Python3 | py | Runtime Error | 0 | 0 | 532 | t = [[0 for i in range(10)] for j in range(10)]
case1 = [(0, 0), (0, -1), (1, 0), (0, 1), (-1, 0)]
case2 = [(1, -1), (1, 1), (-1, 1), (-1, -1)]
case3 = [(0, -2), (2, 0), (0, 2), (-2, 0)]
while True:
try:
x, y, s = map(int, input().split(','))
except:
break
for c in [case1, case2, case3][:s]:
for _x, _y in c:
if y+_y < 0 or x+_x < 0:
continue
t[y+_y][x+_x] += 1
print(sum(1 for l in t for v in l if not v))
print(max(v for l in t for v in l)) | 100
0
| |
s819945459 | p00026 | u354053070 | 1501991132 | Python | Python3 | py | Runtime Error | 0 | 0 | 697 | paper = [[0 for _ in range(14)] for _ in range(14)]
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
while True:
try:
x, y, s = map(int, input().split())
except EOFError:
break
x += 2
y += 2
paper[x][y] += 1
for i in range(4):
paper[x + dx[i]][y + dy[i]] += 1
if s >= 2:
for i in range(4):
paper[x + dx[i] + dx[(i + 1) % 4]][y + dy[i] + dy[(i + 1) % 4]] += 1
if s >= 3:
for i in range(4):
paper[x + 2 * dx[i]][y + 2 * dy[i]] += 1
paper = paper[2:12]
for i in range(10):
paper[i] = paper[i][2:12]
print(sum(paper[i].count(0) for i in range(10)))
print(max(paper[i][j] for i in range(10) for j in range(10))) | 100
0
| |
s572277787 | p00026 | u821624310 | 1503786880 | Python | Python3 | py | Runtime Error | 0 | 0 | 1045 | import sys
paper = [[0 for i in range(10)] for j in range(10)]
for line in sys.stdin:
if line == "\n":
break
x, y, size = map(int, line.split(","))
if size == 1:
paper[y][x] += 1
paper[y-1][x] += 1
paper[y+1][x] += 1
paper[y][x-1] += 1
paper[y][x+1] += 1
elif size == 2:
for i in range(y-1, y+2):
for j in range(x-1, x+2):
paper[i][j] += 1
else:
for i in range(y-1, y+2):
for j in range(x-1, x+2):
paper[i][j] += 1
paper[y-2][x] += 1
paper[y+2][x] += 1
paper[y][x-2] += 1
paper[y][x+2] += 1
#for i in range(10):
#for j in range(10):
#if j == 10 - 1:
#print(paper[i][j])
#else:
#print(paper[i][j], end=" ")
cnt = 0
max_n = 0
for i in range(10):
for j in range(10):
if paper[i][j] == 0:
cnt += 1
if max_n < paper[i][j]:
max_n = paper[i][j]
print(cnt)
print(max_n) | 100
0
| |
s308233445 | p00026 | u203261375 | 1513495966 | Python | Python3 | py | Runtime Error | 0 | 0 | 1239 | import numpy as np
area = [[0 for i in range(10)] for j in range(10)]
area = np.array(area)
while True:
try:
x, y, s = map(int, input().split(','))
except:
break
if s == 3:
if (0 <= x+2 <= 9) and (0 <= y <= 9):
area[x+2][y] += 1
if (0 <= x <= 9) and (0 <= y+2 <= 9):
area[x][y+2] += 1
if (0 <= x-2 <= 9) and (0 <= y <= 9):
area[x-2][y] += 1
if (0 <= x <= 9) and (0 <= y-2 <= 9):
area[x][y-2] += 1
if s >= 2:
if (0 <= x+1 <= 9) and (0 <= y+1 <= 9):
area[x+1][y+1] += 1
if (0 <= x+1 <= 9) and (0 <= y-1 <= 9):
area[x+1][y-1] += 1
if (0 <= x-1 <= 9) and (0 <= y+1 <= 9):
area[x-1][y+1] += 1
if (0 <= x-1 <= 9) and (0 <= y-1 <= 9):
area[x-1][y-1] += 1
if s >= 1:
if (0 <= x+1 <= 9) and (0 <= y <= 9):
area[x+1][y] += 1
if (0 <= x <= 9) and (0 <= y+1 <= 9):
area[x][y+1] += 1
if (0 <= x-1 <= 9) and (0 <= y <= 9):
area[x-1][y] += 1
if (0 <= x <= 9) and (0 <= y-1 <= 9):
area[x][y-1] += 1
area[x][y] += 1
print(len(np.where(area == 0)[0]))
print(area.max()) | 100
0
| |
s750349725 | p00026 | u203261375 | 1513497273 | Python | Python3 | py | Runtime Error | 0 | 0 | 1259 | import numpy as np
area = [[0 for i in range(10)] for j in range(10)]
area = np.array(area)
while True:
try:
y, x, s = map(int, input().split(','))
except:
break
if s == 3:
if (0 <= x+2 <= 9) and (0 <= y <= 9):
area[x+2][y] += 1
if (0 <= x <= 9) and (0 <= y+2 <= 9):
area[x][y+2] += 1
if (0 <= x-2 <= 9) and (0 <= y <= 9):
area[x-2][y] += 1
if (0 <= x <= 9) and (0 <= y-2 <= 9):
area[x][y-2] += 1
if s >= 2:
if (0 <= x+1 <= 9) and (0 <= y+1 <= 9):
area[x+1][y+1] += 1
if (0 <= x+1 <= 9) and (0 <= y-1 <= 9):
area[x+1][y-1] += 1
if (0 <= x-1 <= 9) and (0 <= y+1 <= 9):
area[x-1][y+1] += 1
if (0 <= x-1 <= 9) and (0 <= y-1 <= 9):
area[x-1][y-1] += 1
if s >= 1:
if (0 <= x+1 <= 9) and (0 <= y <= 9):
area[x+1][y] += 1
if (0 <= x <= 9) and (0 <= y+1 <= 9):
area[x][y+1] += 1
if (0 <= x-1 <= 9) and (0 <= y <= 9):
area[x-1][y] += 1
if (0 <= x <= 9) and (0 <= y-1 <= 9):
area[x][y-1] += 1
area[x][y] += 1
print(area)
print(len(np.where(area == 0)[0]))
print(area.max()) | 100
0
| |
s336003007 | p00026 | u024715419 | 1515997011 | Python | Python3 | py | Runtime Error | 0 | 0 | 666 | import numpy as np
p = np.zeros((14,14), dtype=int)
while True:
try:
x_inp, y_inp, s = map(int, input().split(","))
x = x_inp + 2
y = y_inp + 2
if s == 1:
p[y-1][x] += 1
p[y][x-1:x+2] += 1
p[y+1][x] += 1
elif s == 2:
p[y-1][x-1:x+2] += 1
p[y][x-1:x+2] += 1
p[y+1][x-1:x+2] += 1
else:
p[y-2][x] += 1
p[y-1][x-1:x+2] += 1
p[y][x-2:x+3] += 1
p[y+1][x-1:x+2] += 1
p[y+2][x] += 1
except:
break
p_trim = p[2:12,2:12]
print(len(np.where(p_trim==0)[0]))
print(np.max(p_trim))
| 100
0
| |
s205340921 | p00026 | u024715419 | 1515997036 | Python | Python3 | py | Runtime Error | 0 | 0 | 665 | import numpy as np
p = np.zeros((14,14), dtype=int)
while True:
try:
x_inp, y_inp, s = map(int, input().split(","))
x = x_inp + 2
y = y_inp + 2
if s == 1:
p[y-1][x] += 1
p[y][x-1:x+2] += 1
p[y+1][x] += 1
elif s == 2:
p[y-1][x-1:x+2] += 1
p[y][x-1:x+2] += 1
p[y+1][x-1:x+2] += 1
else:
p[y-2][x] += 1
p[y-1][x-1:x+2] += 1
p[y][x-2:x+3] += 1
p[y+1][x-1:x+2] += 1
p[y+2][x] += 1
except:
break
p_trim = p[2:12,2:12]
print(len(np.where(p_trim==0)[0]))
print(np.max(p_trim))
| 100
0
| |
s971486144 | p00026 | u024715419 | 1515997054 | Python | Python3 | py | Runtime Error | 0 | 0 | 646 | p = np.zeros((14,14), dtype=int)
while True:
try:
x_inp, y_inp, s = map(int, input().split(","))
x = x_inp + 2
y = y_inp + 2
if s == 1:
p[y-1][x] += 1
p[y][x-1:x+2] += 1
p[y+1][x] += 1
elif s == 2:
p[y-1][x-1:x+2] += 1
p[y][x-1:x+2] += 1
p[y+1][x-1:x+2] += 1
else:
p[y-2][x] += 1
p[y-1][x-1:x+2] += 1
p[y][x-2:x+3] += 1
p[y+1][x-1:x+2] += 1
p[y+2][x] += 1
except:
break
p_trim = p[2:12,2:12]
print(len(np.where(p_trim==0)[0]))
print(np.max(p_trim))
| Traceback (most recent call last):
File "/tmp/tmpcqbk56ca/tmp_vhl8y2j.py", line 1, in <module>
p = np.zeros((14,14), dtype=int)
^^
NameError: name 'np' is not defined
| |
s610592989 | p00026 | u898097781 | 1525327523 | Python | Python3 | py | Runtime Error | 0 | 0 | 19 | import numpy as np
| ||
s974221916 | p00026 | u898097781 | 1525328298 | Python | Python3 | py | Runtime Error | 0 | 0 | 909 | import sys
lines = []
for line in sys.stdin:
lines.append(line.strip().split(','))
field = [[0 for i in range(10)] for j in range(10)]
def drop(x, y, z):
if z==1:
for i in range(-1,2):
for j in range(-1,2):
if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
elif z==2:
for i in range(-1,2):
for j in range(-1,2):
if 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
else:
for i in range(-2,3):
for j in range(-2,3):
if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
for line in lines:
x,y,z = map(int, line)
print(x,y,z)
drop(x,y,z)
n = 0
m = 0
for f in field:
for e in f:
if e > m:
m = e
if e==0:
n+=1
print(n)
print(m)
| 100
0
| |
s231490331 | p00026 | u898097781 | 1525328336 | Python | Python3 | py | Runtime Error | 0 | 0 | 891 | import sys
lines = []
for line in sys.stdin:
lines.append(line.strip().split(','))
field = [[0 for i in range(10)] for j in range(10)]
def drop(x, y, z):
if z==1:
for i in range(-1,2):
for j in range(-1,2):
if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
elif z==2:
for i in range(-1,2):
for j in range(-1,2):
if 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
else:
for i in range(-2,3):
for j in range(-2,3):
if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
for line in lines:
x,y,z = map(int, line)
print(x,y,z)
drop(x,y,z)
n = 0
m = 0
for f in field:
for e in f:
if e > m:
m = e
if e==0:
n+=1
| ||
s532106152 | p00026 | u898097781 | 1525328369 | Python | Python3 | py | Runtime Error | 0 | 0 | 892 | import sys
lines = []
for line in sys.stdin:
lines.append(line.strip().split(','))
field = [[0 for i in range(10)] for j in range(10)]
def drop(x, y, z):
if z==1:
for i in range(-1,2):
for j in range(-1,2):
if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
elif z==2:
for i in range(-1,2):
for j in range(-1,2):
if 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
else:
for i in range(-2,3):
for j in range(-2,3):
if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
for line in lines:
x,y,z = map(int, line)
drop(x,y,z)
n = 0
m = 0
for f in field:
for e in f:
if e > m:
m = e
if e==0:
n+=1
print(n)
print(m)
| 100
0
| |
s497775157 | p00026 | u898097781 | 1525328377 | Python | Python3 | py | Runtime Error | 0 | 0 | 758 | import sys
lines = []
for line in sys.stdin:
lines.append(line.strip().split(','))
field = [[0 for i in range(10)] for j in range(10)]
def drop(x, y, z):
if z==1:
for i in range(-1,2):
for j in range(-1,2):
if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
elif z==2:
for i in range(-1,2):
for j in range(-1,2):
if 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
else:
for i in range(-2,3):
for j in range(-2,3):
if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
for line in lines:
x,y,z = map(int, line)
drop(x,y,z)
| ||
s443121103 | p00026 | u898097781 | 1525328429 | Python | Python3 | py | Runtime Error | 0 | 0 | 758 | import sys
lines = []
for line in sys.stdin:
lines.append(line.strip().split(','))
field = [[0 for i in range(10)] for j in range(10)]
def drop(x, y, z):
if z==1:
for i in range(-1,2):
for j in range(-1,2):
if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
elif z==2:
for i in range(-1,2):
for j in range(-1,2):
if 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
else:
for i in range(-2,3):
for j in range(-2,3):
if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
for line in lines:
x,y,z = map(int, line)
drop(x,y,z)
| ||
s685354574 | p00026 | u898097781 | 1525328521 | Python | Python3 | py | Runtime Error | 0 | 0 | 897 | import sys
lines = []
for line in sys.stdin:
lines.append(line.strip().split(','))
field = [[0 for i in range(10)] for j in range(10)]
def drop(x, y, z):
if z==1:
for i in range(-1,2):
for j in range(-1,2):
if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
elif z==2:
for i in range(-1,2):
for j in range(-1,2):
if 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
elif z==3:
for i in range(-2,3):
for j in range(-2,3):
if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
field[y+j][x+i] += 1
for line in lines:
x,y,z = map(int, line)
drop(x,y,z)
n = 0
m = 0
for f in field:
for e in f:
if e > m:
m = e
if e==0:
n+=1
print(n)
print(m)
| 100
0
| |
s505337805 | p00026 | u282635979 | 1363949098 | Python | Python | py | Runtime Error | 0 | 0 | 1710 | mass = [[0 for p in xrange(14)] for q in xrange(14)]
while True:
try:
x,y,size = map(int,raw_input().split(','))
if size = 1:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=0,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=0,mass[x][y-1]+=1,mass[x+1][y-1]+=0,mass[x+2][y-1]+=0
mass[x-2][y] +=0,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=0
mass[x-2][y+1]+=0,mass[x-1][y+1]+=0,mass[x][y+1]+=1,mass[x+1][y+1]+=0,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=0,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
elif size = 2:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=0,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=1,mass[x][y-1]+=1,mass[x+1][y-1]+=1,mass[x+2][y-1]+=0
mass[x-2][y] +=0,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=0
mass[x-2][y+1]+=0,mass[x-1][y+1]+=1,mass[x][y+1]+=1,mass[x+1][y+1]+=1,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=0,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
elif size = 3:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=1,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=1,mass[x][y-1]+=1,mass[x+1][y-1]+=1,mass[x+2][y-1]+=0
mass[x-2][y] +=1,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=1
mass[x-2][y+1]+=0,mass[x-1][y+1]+=1,mass[x][y+1]+=1,mass[x+1][y+1]+=1,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=1,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
except: break
white = 0
max = 0
for p in xrange(2,12):
for val in xrange(2,12):
if mass[p][q] == 0: white += 1
if mass[p][q] > figure: max = mass[p][q]
print white
prit max | File "/tmp/tmphvnvdk22/tmpbb00xysc.py", line 5
if size = 1:
^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s035271935 | p00026 | u282635979 | 1363949159 | Python | Python | py | Runtime Error | 0 | 0 | 1708 | mass = [[0 for p in xrange(14)] for q in xrange(14)]
while True:
try:
x,y,size = map(int,raw_input().split(','))
if size = 1:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=0,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=0,mass[x][y-1]+=1,mass[x+1][y-1]+=0,mass[x+2][y-1]+=0
mass[x-2][y] +=0,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=0
mass[x-2][y+1]+=0,mass[x-1][y+1]+=0,mass[x][y+1]+=1,mass[x+1][y+1]+=0,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=0,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
elif size = 2:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=0,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=1,mass[x][y-1]+=1,mass[x+1][y-1]+=1,mass[x+2][y-1]+=0
mass[x-2][y] +=0,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=0
mass[x-2][y+1]+=0,mass[x-1][y+1]+=1,mass[x][y+1]+=1,mass[x+1][y+1]+=1,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=0,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
elif size = 3:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=1,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=1,mass[x][y-1]+=1,mass[x+1][y-1]+=1,mass[x+2][y-1]+=0
mass[x-2][y] +=1,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=1
mass[x-2][y+1]+=0,mass[x-1][y+1]+=1,mass[x][y+1]+=1,mass[x+1][y+1]+=1,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=1,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
except: break
white = 0
max = 0
for p in xrange(2,12):
for val in xrange(2,12):
if mass[p][q] == 0: white += 1
if mass[p][q] > figure: max = mass[p][q]
print white
prit max | File "/tmp/tmpzmwy3hyg/tmpz4u5cxg0.py", line 5
if size = 1:
^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s870350838 | p00026 | u282635979 | 1363949209 | Python | Python | py | Runtime Error | 0 | 0 | 1713 | mass = [[0 for p in xrange(14)] for q in xrange(14)]
while True:
try:
x,y,size = map(int,raw_input().split(','))
if size == 1:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=0,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=0,mass[x][y-1]+=1,mass[x+1][y-1]+=0,mass[x+2][y-1]+=0
mass[x-2][y] +=0,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=0
mass[x-2][y+1]+=0,mass[x-1][y+1]+=0,mass[x][y+1]+=1,mass[x+1][y+1]+=0,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=0,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
elif size == 2:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=0,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=1,mass[x][y-1]+=1,mass[x+1][y-1]+=1,mass[x+2][y-1]+=0
mass[x-2][y] +=0,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=0
mass[x-2][y+1]+=0,mass[x-1][y+1]+=1,mass[x][y+1]+=1,mass[x+1][y+1]+=1,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=0,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
elif size == 3:
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=1,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
mass[x-2][y-1]+=0,mass[x-1][y-1]+=1,mass[x][y-1]+=1,mass[x+1][y-1]+=1,mass[x+2][y-1]+=0
mass[x-2][y] +=1,mass[x-1][y] +=1,mass[x][y] +=1,mass[x+1][y] +=1,mass[x+2][y] +=1
mass[x-2][y+1]+=0,mass[x-1][y+1]+=1,mass[x][y+1]+=1,mass[x+1][y+1]+=1,mass[x+2][y+1]+=0
mass[x-2][y+2]+=0,mass[x-1][y+2]+=0,mass[x][y+2]+=1,mass[x+1][y+2]+=0,mass[x+2][y+2]+=0
except: break
white = 0
max = 0
for p in xrange(2,12):
for val in xrange(2,12):
if mass[p][q] == 0: white += 1
if mass[p][q] > figure: max = mass[p][q]
print white
prit max | File "/tmp/tmposmii8cc/tmpcxagg117.py", line 6
mass[x-2][y-2]+=0,mass[x-1][y-2]+=0,mass[x][y-2]+=0,mass[x+1][y-2]+=0,mass[x+2][y-2]+=0
^^
SyntaxError: invalid syntax
| |
s648265232 | p00026 | u282635979 | 1363949516 | Python | Python | py | Runtime Error | 0 | 0 | 1713 | mass = [[0 for p in xrange(14)] for q in xrange(14)]
while True:
try:
x,y,size = map(int,raw_input().split(','))
if size == 1:
mass[x-2][y-2]+=0;mass[x-1][y-2]+=0;mass[x][y-2]+=0;mass[x+1][y-2]+=0;mass[x+2][y-2]+=0
mass[x-2][y-1]+=0;mass[x-1][y-1]+=0;mass[x][y-1]+=1;mass[x+1][y-1]+=0;mass[x+2][y-1]+=0
mass[x-2][y] +=0;mass[x-1][y] +=1;mass[x][y] +=1;mass[x+1][y] +=1;mass[x+2][y] +=0
mass[x-2][y+1]+=0;mass[x-1][y+1]+=0;mass[x][y+1]+=1;mass[x+1][y+1]+=0;mass[x+2][y+1]+=0
mass[x-2][y+2]+=0;mass[x-1][y+2]+=0;mass[x][y+2]+=0;mass[x+1][y+2]+=0;mass[x+2][y+2]+=0
elif size == 2:
mass[x-2][y-2]+=0;mass[x-1][y-2]+=0;mass[x][y-2]+=0;mass[x+1][y-2]+=0;mass[x+2][y-2]+=0
mass[x-2][y-1]+=0;mass[x-1][y-1]+=1;mass[x][y-1]+=1;mass[x+1][y-1]+=1;mass[x+2][y-1]+=0
mass[x-2][y] +=0;mass[x-1][y] +=1;mass[x][y] +=1;mass[x+1][y] +=1;mass[x+2][y] +=0
mass[x-2][y+1]+=0;mass[x-1][y+1]+=1;mass[x][y+1]+=1;mass[x+1][y+1]+=1;mass[x+2][y+1]+=0
mass[x-2][y+2]+=0;mass[x-1][y+2]+=0;mass[x][y+2]+=0;mass[x+1][y+2]+=0;mass[x+2][y+2]+=0
elif size == 3:
mass[x-2][y-2]+=0;mass[x-1][y-2]+=0;mass[x][y-2]+=1;mass[x+1][y-2]+=0;mass[x+2][y-2]+=0
mass[x-2][y-1]+=0;mass[x-1][y-1]+=1;mass[x][y-1]+=1;mass[x+1][y-1]+=1;mass[x+2][y-1]+=0
mass[x-2][y] +=1;mass[x-1][y] +=1;mass[x][y] +=1;mass[x+1][y] +=1;mass[x+2][y] +=1
mass[x-2][y+1]+=0;mass[x-1][y+1]+=1;mass[x][y+1]+=1;mass[x+1][y+1]+=1;mass[x+2][y+1]+=0
mass[x-2][y+2]+=0;mass[x-1][y+2]+=0;mass[x][y+2]+=1;mass[x+1][y+2]+=0;mass[x+2][y+2]+=0
except: break
white = 0
max = 0
for p in xrange(2,12):
for val in xrange(2,12):
if mass[p][q] == 0: white += 1
if mass[p][q] > figure: max = mass[p][q]
print white
prit max | File "/tmp/tmp5_xwd7q7/tmpfhw_4juz.py", line 30
print white
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s863559118 | p00026 | u282635979 | 1363949546 | Python | Python | py | Runtime Error | 0 | 0 | 1714 | mass = [[0 for p in xrange(14)] for q in xrange(14)]
while True:
try:
x,y,size = map(int,raw_input().split(','))
if size == 1:
mass[x-2][y-2]+=0;mass[x-1][y-2]+=0;mass[x][y-2]+=0;mass[x+1][y-2]+=0;mass[x+2][y-2]+=0
mass[x-2][y-1]+=0;mass[x-1][y-1]+=0;mass[x][y-1]+=1;mass[x+1][y-1]+=0;mass[x+2][y-1]+=0
mass[x-2][y] +=0;mass[x-1][y] +=1;mass[x][y] +=1;mass[x+1][y] +=1;mass[x+2][y] +=0
mass[x-2][y+1]+=0;mass[x-1][y+1]+=0;mass[x][y+1]+=1;mass[x+1][y+1]+=0;mass[x+2][y+1]+=0
mass[x-2][y+2]+=0;mass[x-1][y+2]+=0;mass[x][y+2]+=0;mass[x+1][y+2]+=0;mass[x+2][y+2]+=0
elif size == 2:
mass[x-2][y-2]+=0;mass[x-1][y-2]+=0;mass[x][y-2]+=0;mass[x+1][y-2]+=0;mass[x+2][y-2]+=0
mass[x-2][y-1]+=0;mass[x-1][y-1]+=1;mass[x][y-1]+=1;mass[x+1][y-1]+=1;mass[x+2][y-1]+=0
mass[x-2][y] +=0;mass[x-1][y] +=1;mass[x][y] +=1;mass[x+1][y] +=1;mass[x+2][y] +=0
mass[x-2][y+1]+=0;mass[x-1][y+1]+=1;mass[x][y+1]+=1;mass[x+1][y+1]+=1;mass[x+2][y+1]+=0
mass[x-2][y+2]+=0;mass[x-1][y+2]+=0;mass[x][y+2]+=0;mass[x+1][y+2]+=0;mass[x+2][y+2]+=0
elif size == 3:
mass[x-2][y-2]+=0;mass[x-1][y-2]+=0;mass[x][y-2]+=1;mass[x+1][y-2]+=0;mass[x+2][y-2]+=0
mass[x-2][y-1]+=0;mass[x-1][y-1]+=1;mass[x][y-1]+=1;mass[x+1][y-1]+=1;mass[x+2][y-1]+=0
mass[x-2][y] +=1;mass[x-1][y] +=1;mass[x][y] +=1;mass[x+1][y] +=1;mass[x+2][y] +=1
mass[x-2][y+1]+=0;mass[x-1][y+1]+=1;mass[x][y+1]+=1;mass[x+1][y+1]+=1;mass[x+2][y+1]+=0
mass[x-2][y+2]+=0;mass[x-1][y+2]+=0;mass[x][y+2]+=1;mass[x+1][y+2]+=0;mass[x+2][y+2]+=0
except: break
white = 0
max = 0
for p in xrange(2,12):
for val in xrange(2,12):
if mass[p][q] == 0: white += 1
if mass[p][q] > figure: max = mass[p][q]
print white
print max | File "/tmp/tmpo48h6y0l/tmpzd4pcrs0.py", line 30
print white
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s410173806 | p00026 | u542421762 | 1368262842 | Python | Python | py | Runtime Error | 0 | 0 | 1359 |
import sys
class Paper:
def __init__(self):
self.paper = [[0 for x in range(10)] for y in range(10)]
def white_space(self):
s = 0
for x in range(10):
for y in range(10):
if self.paper[x][y] == 0:
s += 1
return s
def most_dark(self):
s = 0
for x in range(10):
for y in range(10):
if self.paper[x][y] > s:
s = self.paper[x][y]
return s
def drop(self, x, y, size):
r = []
if size == 1:
r.append((x,y))
r.append((x-1,y))
r.append((x+1,y))
r.append((x,y-1))
r.append((x,y+1))
elif size == 2:
r = [(i,j) for i in range(x-1, x+2) for j in range(y-1, y+2)]
elif size == 3:
r = [(i,j) for i in range(x-1, x+2) for j in range(y-1, y+2)]
r.append((x-2, y))
r.append((x+2, y))
r.append((x, y-2))
r.append((x, y+2))
else:
pass
for p in r:
self.paper[p[0]][p[1]] += 1
return self
#input_file = open(sys.argv[1], 'r')
paper = Paper()
for line in sys.stdin:
(x, y, size) = tuple(map(int, line.split(',')))
paper.drop(x, y, size)
print paper.white_space()
print paper.most_dark() | File "/tmp/tmpwfqmvm6t/tmpevpo3ts9.py", line 54
print paper.white_space()
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s305503481 | p00026 | u542421762 | 1368263618 | Python | Python | py | Runtime Error | 0 | 0 | 1565 |
import sys
class Paper:
def __init__(self):
self.paper = [[0 for x in range(10)] for y in range(10)]
def white_space(self):
s = 0
for x in range(10):
for y in range(10):
if self.paper[x][y] == 0:
s += 1
return s
def most_dark(self):
s = 0
for x in range(10):
for y in range(10):
if self.paper[x][y] > s:
s = self.paper[x][y]
return s
def drop(self, x, y, size):
r = []
if size == 1:
r.append((x,y))
r.append((x-1,y))
r.append((x+1,y))
r.append((x,y-1))
r.append((x,y+1))
elif size == 2:
r = [(i,j) for i in range(x-1, x+2) for j in range(y-1, y+2)]
elif size == 3:
r = [(i,j) for i in range(x-1, x+2) for j in range(y-1, y+2)]
r.append((x-2, y))
r.append((x+2, y))
r.append((x, y-2))
r.append((x, y+2))
else:
pass
r = filter(self.out_of_paper, r)
try:
for p in r:
self.paper[p[0]][p[1]] += 1
except:
pass
return self
def out_of_paper(p):
if p[0] >= 0 and p[1] >= 0:
True
else:
False
#input_file = open(sys.argv[1], 'r')
paper = Paper()
for line in sys.stdin:
(x, y, size) = tuple(map(int, line.split(',')))
paper.drop(x, y, size)
print paper.white_space()
print paper.most_dark() | File "/tmp/tmpedknrwh3/tmpuao9ve8f.py", line 64
print paper.white_space()
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s083395476 | p00026 | u633068244 | 1393390498 | Python | Python | py | Runtime Error | 0 | 0 | 966 | #use 14x14 paper
paper = [[0 for i in range(14)] for i in range(14)]
while True:
try:
x, y, s = map(int, raw_input().split(","))
x += 2; y += 2
if s == 1:
paper[x][y] += 1
for i in range(-1,2,2):
paper[x+i][y] += 1
paper[x][y+1] += 1
elif s == 2:
for i in range(-1,2):
for j in range(-1,2):
paper[x+i][y+j] += 1
else:
paper[x+2][y] += 1; paper[x-2][y] += 1
paper[x][y+2] += 1; paper[x][y-2] += 1
for i in range(-1,2):
for j in range(-1,2):
paper[x+i][y+j] += 1
except:
break
#count white and check max element in paper
white = 0
max = 0
for i in range(2,12):
for j in range(2,12):
if paper[i][j] == 0:
white += 1
elif paper[i][j] > max:
max = paper[i][j]
print "%d" % (white)
print "%max" % (max) | File "/tmp/tmpjhcsokkh/tmprwj22q90.py", line 32
elif paper[i][j] > max:
TabError: inconsistent use of tabs and spaces in indentation
| |
s905521283 | p00026 | u912237403 | 1394294474 | Python | Python | py | Runtime Error | 0 | 0 | 533 | import sys
def ink(x,y,size):
global P
P[y][x]+=1
for d in [-1,1]:
P[y+d][x]+=1
P[y][x+d]+=1
if size==1: return
for d in [-1,1]:
P[y+d][x+d]+=1
P[y+d][x-d]+=1
if size==2: return
for d in [-2,2]:
P[y+d][x]+=1
P[y][x+d]+=1
return
R=range(14)
A=[-1:1]
P=[[0 for i in R] for j in R]
for s in sys.stdin:
x,y,size = map(int, s.split(","))
ink(x+2,y+2,size)
c=0
m=0
for e in P[2:-2]:
x=e[2:-2]
c+=x.count(0)
m=max(max(x),m)
print c
print m | File "/tmp/tmpf3tb7k6l/tmppkz75vle.py", line 19
A=[-1:1]
^
SyntaxError: invalid syntax
| |
s333723146 | p00027 | u560838141 | 1408859056 | Python | Python | py | Runtime Error | 0 | 0 | 226 | import datetime
weekdays = [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
]
while True:
m, d = map(int, raw_input().strip().split(" "))
print weekdays[datetime.date(2004, m, d).weekday()] | File "/tmp/tmpubmxhxi0/tmpo21cb5oc.py", line 15
print weekdays[datetime.date(2004, m, d).weekday()]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s549130922 | p00027 | u540744789 | 1426608430 | Python | Python | py | Runtime Error | 0 | 0 | 411 | days_sum={1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,
10:31,11:30,12:31}
days2month={1:'Thursday',2:'Friday',3:'Saturday',4:'Sunday',
5:'Monday',6:'Tuesday',7:'Wednesday'}
while True:
month,day=map(int,raw_input().split(" "))
if month==0 and day==0:
break
keika=0
for i in range(1,month):
keika += days_sum[i]
keika+=day
print days2month[keika%7] | File "/tmp/tmptuig3uh5/tmp8j_bu4eu.py", line 14
print days2month[keika%7]
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s252086882 | p00027 | u340523328 | 1433400581 | Python | Python | py | Runtime Error | 0 | 0 | 128 | from datetime import date
while 1:
m,d=map(int,raw_input().split())
if m==0:break
print date(404,m,d).strftime("%A") | File "/tmp/tmp1tym5ujg/tmpy6klzs9o.py", line 5
print date(404,m,d).strftime("%A")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s649854134 | p00027 | u358919705 | 1471992179 | Python | Python3 | py | Runtime Error | 0 | 0 | 314 | days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
nums = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
while True:
try:
m, d = map(int, input().split())
if not m:
break
except:
break
print(days[(sum(nums[:m - 1]) + d) % 7 + 2]) | ||
s073075110 | p00027 | u821624310 | 1502793880 | Python | Python3 | py | Runtime Error | 0 | 0 | 373 | week = {"1": "Thursday", "2": "Friday", "3": "Saturday", "4": "Sunday", "5": "Monday", "6": "Tuesday", "7": "Wednesday"}
month = {"1": 0, "2": 31, "3": 60, "4": 91, "5": 121, "6": 152, "7": 182, "8": 213, "9": 244, "10": 274, "11": 305, "12": 335}
m, d = input().split()
while m != "0":
days = month[m] + int(d)
print(week[str(days % 7)])
m, d = input().split() | Traceback (most recent call last):
File "/tmp/tmp28u5j1pe/tmpqqq22h6v.py", line 3, in <module>
m, d = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s395343386 | p00027 | u821624310 | 1502794125 | Python | Python3 | py | Runtime Error | 0 | 0 | 373 | week = {"1": "Thursday", "2": "Friday", "3": "Saturday", "4": "Sunday", "5": "Monday", "6": "Tuesday", "7": "Wednesday"}
month = {"1": 0, "2": 31, "3": 60, "4": 91, "5": 121, "6": 152, "7": 182, "8": 213, "9": 244, "10": 274, "11": 305, "12": 335}
m, d = input().split()
while m != "0":
days = month[m] + int(d)
print(week[str(days % 7)])
m, d = input().split() | Traceback (most recent call last):
File "/tmp/tmp8dy_fg6x/tmpg9z03izw.py", line 3, in <module>
m, d = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s470472164 | p00027 | u821624310 | 1502795663 | Python | Python3 | py | Runtime Error | 0 | 0 | 338 | week = {1: "Thursday", 2: "Friday", 3: "Saturday", 4: "Sunday", 5: "Monday", 6: "Tuesday", 7: "Wednesday"}
month = {1: 0, 2: 31, 3: 60, 4: 91, 5: 121, 6: 152, 7: 182, 8: 213, 9: 244, 10: 274, 11: 305, 12: 335}
m, d = map(int, input().split())
while m:
days = month[m] + d
print(week[days % 7])
m, d = map(int, input().split()) | Traceback (most recent call last):
File "/tmp/tmpnsificcn/tmpv1wgjcjl.py", line 3, in <module>
m, d = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s227799393 | p00027 | u821624310 | 1502796069 | Python | Python3 | py | Runtime Error | 0 | 0 | 337 | week = {1: "Thursday", 2: "Friday", 3: "Saturday", 4: "Sunday", 5: "Monday", 6: "Tuesday", 7: "Wednesday"}
month = {1: 0, 2: 31, 3: 60, 4: 91, 5: 121, 6: 152, 7: 182, 8: 213, 9: 244, 10: 274, 11: 305, 12: 335}
while True:
m, d = map(int, input().split())
if m == 0:
break
days = month[m] + d
print(week[days % 7]) | Traceback (most recent call last):
File "/tmp/tmpjuge_v9o/tmps15o_xev.py", line 4, in <module>
m, d = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s190211638 | p00027 | u009288816 | 1515322760 | Python | Python | py | Runtime Error | 0 | 0 | 594 | import sys
l = []
day = ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']
size = [31,29,31,30,31,30,31,31,30,31,30,31]
for input in sys.stdin:
l.append(input.split())
for i in range(0,len(l)):
for j in range(0,len(l[i])):
l[i][j] = int(l[i][j])
for i in range(0,len(l)):
temp = 0
if((l[i][0]-1) < 0 or (l[i][0]-1) > 11):
continue
if((l[i][0]-1) > 0):
for j in range(0,l[i][0]-1):
temp += size[j]
temp += l[i][1]
temp = temp - 1
temp = temp % 7
if(temp > 3):
temp -= 3
print day[temp+3]
| File "/tmp/tmp6j4rf8dv/tmpkuzp1azs.py", line 23
print day[temp+3]
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s821667514 | p00027 | u724548524 | 1525854181 | Python | Python3 | py | Runtime Error | 0 | 0 | 228 | s = (0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30)
w = ("Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday")
while True:
m, d = map(int, input().split())
if m == 0:break
print(w[(d + sum(s[:m])) % 7])
| Traceback (most recent call last):
File "/tmp/tmprbgfth5d/tmpq33hbzbg.py", line 4, in <module>
m, d = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s439653022 | p00027 | u011621222 | 1525880004 | Python | Python3 | py | Runtime Error | 0 | 0 | 324 | day=['0','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']
mou=[0,31,29,31,30,31,30,31,31,30,31,30,31]
while True:
try:
n,m=map(int,input().split())
except:
break
if n==0 and m==0:
break
count=0
for a in range(1,n+1):
if a==n :
count+=m
else:
count+=mou[a]
print(day[count%7+3])
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.