@@ -0,0 +1,473 @@
+package leetcode;%0A%0A/**%0A * https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/%0A */%0Apublic class Problem1351 %7B%0A    public int countNegatives(int%5B%5D%5B%5D grid) %7B%0A        int answer = 0;%0A        for (int i = 0; i %3C grid.length; i++) %7B%0A            for (int j = grid%5Bi%5D.length - 1; j %3E= 0; j--) %7B%0A                if (grid%5Bi%5D%5Bj%5D %3E= 0) %7B%0A                    break;%0A                %7D%0A                answer++;%0A            %7D%0A        %7D%0A        return answer;%0A    %7D%0A%7D%0A

Solve problem 1351