Skip to content

Commit 7794d22

Browse files
authored
Update maximum-area-rectangle-with-point-constraints-i.cpp
1 parent 9bdabcb commit 7794d22

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

C++/maximum-area-rectangle-with-point-constraints-i.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ class Solution {
4040
sorted_ys.emplace(p[1]);
4141
}
4242
unordered_map<int, int> y_to_idx;
43-
int i = 0;
4443
for (const auto& y : sorted_ys) {
45-
y_to_idx[y] = i++;
44+
y_to_idx[y] = size(y_to_idx);
4645
}
4746
BIT bit(size(y_to_idx));
4847
unordered_map<int, unordered_map<int, pair<int, int>>> lookup;

0 commit comments

Comments
 (0)