aboutsummaryrefslogtreecommitdiff
path: root/count_negative_num_matrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'count_negative_num_matrix.cpp')
-rw-r--r--count_negative_num_matrix.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/count_negative_num_matrix.cpp b/count_negative_num_matrix.cpp
index 2496cf8..f7c776d 100644
--- a/count_negative_num_matrix.cpp
+++ b/count_negative_num_matrix.cpp
@@ -6,7 +6,7 @@
class Solution {
public:
- int countNegatives(vvd(int) & grid) {
+ int countNegatives(vvd & grid) {
int ans = 0;
for (vector<int> row : grid)
for (int i : row)
@@ -29,9 +29,9 @@ public:
int main() {
Solution obj;
- vvd(int)
+ vvd
g1 = {{4, 3, 2, -1}, {3, 2, 1, -1}, {1, 1, -1, -2}, {-1, -1, -2, -3}};
- vvd(int) g2 = {{3, 2}, {1, 0}};
+ vvd g2 = {{3, 2}, {1, 0}};
printf("%d\n", obj.countNegatives(g1)); // expect: 8
printf("%d\n", obj.countNegatives(g2)); // expect: 0
}