Last active
March 18, 2019 11:36
-
-
Save malkoG/d74cffef94267e4dfb08d88e744fd28d to your computer and use it in GitHub Desktop.
noj.am/2799
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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