diff --git a/08/2022-12-08-A.py b/08/2022-12-08-A.py index fff2d69..229ff22 100644 --- a/08/2022-12-08-A.py +++ b/08/2022-12-08-A.py @@ -10,10 +10,10 @@ for y in range(1,np.shape(a)[0]-1): # Visible? left = True if len(list(np.where(a[y][0:x]>=a[y][x])[0]))<1 else False right = True if len(list(np.where(a[y][x:] >=a[y][x])[0][1:]))<1 else False - top = True if len(list(np.where(a[:,x][0:y]>=a[y,x])[0]))<1 else False - bottom = True if len(list(np.where(a[:,x][y:]>=a[y,x])[0][1:]))<1 else False + aktiv = True if len(list(np.where(a[:,x][0:y]>=a[y,x])[0]))<1 else False + passiv = True if len(list(np.where(a[:,x][y:]>=a[y,x])[0][1:]))<1 else False - if left or right or top or bottom: + if left or right or aktiv or passiv: visible+=1 print(visible)