diff options
Diffstat (limited to 'most_stones_remove.cpp')
-rw-r--r-- | most_stones_remove.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/most_stones_remove.cpp b/most_stones_remove.cpp index 632a7fc..97499f8 100644 --- a/most_stones_remove.cpp +++ b/most_stones_remove.cpp @@ -20,7 +20,7 @@ public: cols[stones[i][1]].push_back(i); } unordered_set<int> seen; - function<int(int)> dfs; + function<int> dfs; dfs = [&](int i) -> int { if (seen.count(i)) return 0; @@ -40,7 +40,7 @@ public: int main() { Solution obj; - vvd(int) s1 = {{0, 0}, {0, 1}, {1, 0}, {1, 2}, {2, 1}, {2, 2}}, + vvd s1 = {{0, 0}, {0, 1}, {1, 0}, {1, 2}, {2, 1}, {2, 2}}, s2 = {{0, 1}, {0, 2}, {1, 1}, {2, 0}, {2, 2}}; printf("%d\n", obj.removeStones(s1)); // expect: 5 printf("%d\n", obj.removeStones(s2)); // expect: 3 |