Skip to content

Commit

Permalink
447 updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyubobobo committed May 19, 2019
1 parent 47b176e commit c1ca9ac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions 0447-Number-of-Boomerangs/cpp-0447/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using namespace std;
/// Space Complexity: O(n)
class Solution {
public:
int numberOfBoomerangs(vector<pair<int, int>>& points) {
int numberOfBoomerangs(vector<vector<int>>& points) {

int res = 0;
for( int i = 0 ; i < points.size() ; i ++ ){
Expand All @@ -34,12 +34,13 @@ class Solution {
}

private:
int dis(const pair<int,int> &pa, const pair<int,int> &pb){
return (pa.first - pb.first) * (pa.first - pb.first) +
(pa.second - pb.second) * (pa.second - pb.second);
int dis(const vector<int> &pa, const vector<int> &pb){
return (pa[0] - pb[0]) * (pa[0] - pb[0]) +
(pa[1] - pb[1]) * (pa[1] - pb[1]);
}
};


int main() {

vector<pair<int,int>> vec;
Expand Down

0 comments on commit c1ca9ac

Please sign in to comment.