Skip to content

Commit f2c9ee9

Browse files
committed
Runtime: 610 ms (Top 86.39%) | Memory: 140.5 MB (Top 68.04%)
1 parent 1bd06db commit f2c9ee9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/N/Number of Pairs of Interchangeable Rectangles/Number of Pairs of Interchangeable Rectangles.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 610 ms (Top 86.39%) | Memory: 140.5 MB (Top 68.04%)
12
class Solution {
23
public:
34
long long interchangeableRectangles(vector<vector<int>>& rectangles) {
@@ -8,12 +9,12 @@ class Solution {
89
mp[ratio]++;
910
}
1011
long long count = 0;
11-
12+
1213
for(auto i: mp){
1314
long long x = i.second;
1415
x = (x * (x-1))/2.0;
1516
count += x;
1617
}
1718
return count;
1819
}
19-
};
20+
};

0 commit comments

Comments
 (0)