code: 
  
  
  """simple docstring"""
  
  
  
  
  import numpy as np
  
  
  
  
  
  def 			a_   (  lowercase__   :Any    ):
  			__lowerCamelCase        =			a.shape
  			__lowerCamelCase        =			min(SCREAMING_SNAKE_CASE__, SCREAMING_SNAKE_CASE__    )
  			__lowerCamelCase        =			np.eye(SCREAMING_SNAKE_CASE__    )
  			__lowerCamelCase        =			a.copy()
  
  			for k in range(t - 1    ):
  						# select a column of modified matrix A':
  						__lowerCamelCase        =			r[k:, [k]]
  						# construct first basis vector
  						__lowerCamelCase        =			np.zeros_like(SCREAMING_SNAKE_CASE__    )
  						__lowerCamelCase        =			1.0
  						# determine scaling factor
  						__lowerCamelCase        =			np.linalg.norm(SCREAMING_SNAKE_CASE__    )
  						# construct vector v for Householder reflection
  						__lowerCamelCase        =			x + np.sign(x[0]    ) * alpha * ea
  						v /= np.linalg.norm(SCREAMING_SNAKE_CASE__    )
  
  						# construct the Householder matrix
  						__lowerCamelCase        =			np.eye(m - k    ) - 2.0 * v @ v.T
  						# pad with ones and zeros as necessary
  						__lowerCamelCase        =			np.block([[np.eye(SCREAMING_SNAKE_CASE__    ), np.zeros((k, m - k)    )], [np.zeros((m - k, k)    ), q_k]]    )
  
  						__lowerCamelCase        =			q @ q_k.T
  						__lowerCamelCase        =			q_k @ r
  
  			return q, r
  
  
  if __name__ == "__main__":
  					import doctest
  
  					doctest.testmod()
  
  
  
  
  
style_context: 
  
  
  """simple docstring"""
  
  
  
  
  import os
  
  
  
  
  
  def 			a_   (  ):
  			__lowerCamelCase        =			os.path.dirname(os.path.realpath(lowercase__    )    )
  			__lowerCamelCase        =			os.path.join(lowercase__, """triangle.txt"""    )
  
  			with open(lowercase__    ) as in_file:
  						__lowerCamelCase        =			[[int(lowercase__    ) for i in line.split()] for line in in_file]
  
  			while len(lowercase__    ) != 1:
  						__lowerCamelCase        =			triangle.pop()
  						__lowerCamelCase        =			triangle[-1]
  						for j in range(len(lowercase__    ) - 1    ):
  									curr_row[j] += max(last_row[j], last_row[j + 1]    )
  			return triangle[0][0]
  
  
  if __name__ == "__main__":
  					print(solution())
  
  
  
  
  