We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd2aaee commit aecb8ebCopy full SHA for aecb8eb
1 file changed
C++/perfect-rectangle.cpp
@@ -29,7 +29,7 @@ class Solution {
29
}
30
31
32
- bool is_valid[16] = {false};
+ bitset<16> is_valid;
33
is_valid[LB | RB] = is_valid[LB | LT] = is_valid[RB | RT] = is_valid[LT | RT] = is_valid[LB | RB | LT | RT] = true;
34
for (auto itx = corner_count.cbegin(); itx != corner_count.cend(); ++itx) {
35
const auto x = itx->first;
0 commit comments