Maze X29127


Statement
 

pdf   zip

html
Public test cases
  • Input

    7
    7
    0
    

    Output

    12
    
  • Input

    7
    7
    2
    0,1,6,1
    1,4,7,4
    
    

    Output

    24
    
  • Input

    7
    7 
    2
    0,2,3,2
    3,2,3,0
    
    

    Output

    -1
    
  • Information
    Author
    HP Codewars BCN
    Language
    English
    Official solutions
    C++ Python
    User solutions
    C++ Python