You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
原题的函数定义是 findMinArrowShots(vector<vector<int>>& points),类型是 vector<vector<int>> ,不是 vector<pair<int, int>>。所以代码里的 first 和 second 对应也需要修改。
我试了下,修改函数会报编译错误。
Line 30: Char 46: error: non-const lvalue reference to type 'vector<pair<int, int>>' cannot bind to a value of unrelated type 'vector<vector<int>>'
int ret = Solution().findMinArrowShots(param_1); return ret;
^~~~~~~
Line 7: Char 51: note: passing argument to parameter 'points' here
int findMinArrowShots(vector<pair<int, int>>& points)
^
1 error generated.
PS:是不是关神做的时候题目是 pair 后来改成 vector : )
The text was updated successfully, but these errors were encountered:
LeetCode/Greedy/452.Minimum-Number-of-Arrows-to-Burst-Balloons/452.Minimum-Number-of-Arrows-to-Burst-Balloons.cpp
Line 7 in 69b113a
原题的函数定义是
findMinArrowShots(vector<vector<int>>& points)
,类型是vector<vector<int>>
,不是vector<pair<int, int>>
。所以代码里的first
和second
对应也需要修改。我试了下,修改函数会报编译错误。
PS:是不是关神做的时候题目是
pair
后来改成vector
: )The text was updated successfully, but these errors were encountered: