Min and Max

Sort by

recency

|

332 Discussions

|

  • + 0 comments

    import numpy n, m = map(int, input().split()) my_array = [] for _ in range(n): my_array.append(list(map(int, input().split()))) print(max(numpy.min(my_array, axis = 1)))

  • + 0 comments

    Understandable code from my side..

    import numpy
    
    a , b = map(int,input().split())
    
    arrayList = []
    for i in range(a):
        arrayList.append(list(map(int,input().split())))
    
    print(numpy.max(numpy.min(arrayList, axis = 1)))
    
  • + 0 comments

    import numpy as np N,M = map(int,input().split()) print(np.max(np.min(np.array([list(map(int,input().split())) for _ in range(N)]),axis=1)))

  • + 0 comments

    import numpy as np

    def sample_input_func(x): return list(map(int, x.split()))

    def main():
    N, M = sample_input_func(input()) initial_array = np.array([sample_input_func(input()) for _ in range(N)]) min_array = np.min(initial_array, axis = 1) max_array = np.max(min_array, axis = 0) print(max_array)

    main()

  • + 0 comments

    import numpy as np

    x, y = map(int, input().split())

    data = [list(map(int, input().split())) for _ in range(x)]

    data = np.array(data)

    result = np.min(data, axis = 1)

    print(np.max(result))