Skip to content

Instantly share code, notes, and snippets.

View iwouldnot's full-sized avatar

Ivan Vaniushin iwouldnot

  • Tomsk, Russia
View GitHub Profile
anonymous
anonymous / lab1.py
Created September 11, 2017 06:05
import numpy as np
import time
from tqdm import tnrange, tqdm
from bokeh.plotting import figure, output_notebook, show
def solve(a):
diag = np.diag(np.fliplr(a)) # n + log(n)
min_elem_index = diag.argmin() # n^2
avrg_sum = a[a < 0].mean() # nlog(n)
min_elem_row, min_elem_columns = min_elem_index, a.shape[1] - min_elem_index - 1 # 5