[LeetCode] Longest Line of Consecutive One in Matrix 矩阵中最长的连续1
Givena01matrixM,findthelongestlineofconsecutiveoneinthematrix.Thelinecouldbehorizontal,vertical,diagonaloranti-diagonal.Example:Input:[[0,1,1,0],[0,1,1,0],[0,0,0,1]]Output:3Hint:Thenumberofelementsint