Skip to content

Instantly share code, notes, and snippets.

@malkoG
Last active March 18, 2019 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malkoG/d74cffef94267e4dfb08d88e744fd28d to your computer and use it in GitHub Desktop.
Save malkoG/d74cffef94267e4dfb08d88e744fd28d to your computer and use it in GitHub Desktop.
noj.am/2799
rows,cols=map(int, input().split())
apartment=[input() for i in range(0, rows*5+1)]
window_counts=[0,0,0,0,0]
for row in range(0,rows):
current_row = 5*row+1
for col in range(0,cols):
matches = 0
current_col = 5*col+1
for i in range(0, 4):
if apartment[current_row+i][current_col:current_col+4] == '****':
matches += 1
window_counts[matches] += 1
print(' '.join(list(map(str, window_counts))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment