Matrix: longest skiing path