Min and Max

Sort by

recency

|

331 Discussions

|

  • + 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))

  • + 1 comment

    import numpy

    if name == 'main':

    N , M = map(int , input().split())
    
    List = []
    
    for i in range(N):
    
        X = list(map(int , input().split()))
        List.append(X)
    
    min_array = numpy.min(List , axis = 1)
    max_array = numpy.max(min_array)
    
    print(max_array)