Min and Max

Sort by

recency

|

338 Discussions

|

  • [deleted]Challenge Author
    + 0 comments

    For Python3

    from numpy import array, min, max
    
    n, m = map(int, input().split())
    arr = array([input().split() for i in range(n)], dtype=int)
    
    print(max(min(arr, axis = 1)))
    
  • + 0 comments
    import numpy
    
    
    n, m = map(int, input().split())
    
    l = []
    for _ in range(n):
        l.append(list(map(int, input().split())))
    
    np_arr = numpy.array(l)
    
    print(numpy.max(numpy.min(np_arr, axis=1)))
    
  • + 0 comments

    import numpy as np

    n,m = map(int, input().split()) a= [] for i in range(n): a.append(list(map(int, input().split()))) print(np.max(np.min(a, axis = 1)))

  • + 0 comments

    import numpy as np

    n, m = list(map(int, input().strip().split()))

    arr = np.array([input().strip().split() for _ in range(n)], dtype=np.int32) print(np.max(np.min(arr, axis = 1)))

  • + 0 comments

    import numpy as np n, m = input().split() l = [] for i in range(int(n)): l.append(list(map(int, input().split())))

    arr = np.array(l) minimum = np.min(arr, axis=1) maximum = set(minimum) print(max(maximum))