Take the red pill X68967


Statement
 

pdf   zip

html

Input

The input consists of:

* The first row contains a single integer N that defines the matrix size (N rows x N columns). * The following N lines define the rows of the matrix with N integer values per row.

Output

If there is a saddle point, print a message saying which element of the matrix is the saddle point. Otherwise, print the error message "No saddle point in the matrix".

Public test cases
  • Input

    3
    1 2 3
    4 5 6
    7 8 9
    

    Output

    The saddle point is 7
    
  • Input

    3
    1 2 3
    7 8 9
    10 5 6
    

    Output

    No saddle point in the matrix
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    Haskell Python