Skip to content

Commit 5e9d5ff

Browse files
authored
Update maximum-number-of-ones.cpp
1 parent 0aed488 commit 5e9d5ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

C++/maximum-number-of-ones.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class Solution {
88
swap(width, height);
99
}
1010

11-
int R = height / sideLength, r = height % sideLength;
12-
int C = width / sideLength, c = width % sideLength;
11+
const auto& R = height / sideLength, &r = height % sideLength;
12+
const auto& C = width / sideLength, &c = width % sideLength;
1313
assert(R <= C);
1414
vector<pair<int, int>> area_counts = {{r * c, (R + 1) * (C + 1)},
1515
{r * (sideLength - c), (R + 1) * C},

0 commit comments

Comments
 (0)