20 lines
483 B
Python
20 lines
483 B
Python
|
S = 0
|
||
|
I = open("input").read()
|
||
|
th=2
|
||
|
@par(num_threads=th,chunk_size=500//th)
|
||
|
for i in range(500):
|
||
|
if I[43*i] == '#':
|
||
|
#@par # much slower
|
||
|
for j in range(500):
|
||
|
if I[43*j] == '.':
|
||
|
for k in range(6,37):
|
||
|
if I[43*i+k]=='#' and I[43*j+k]=='#':
|
||
|
break
|
||
|
else:
|
||
|
S += 1
|
||
|
print(S)
|
||
|
# 130ms with cpython
|
||
|
# with codon
|
||
|
# par 1 th: 6ms
|
||
|
# par 2 th: 4ms
|
||
|
# more // is slower
|