Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
hikjik committed Nov 25, 2023
1 parent b6bf49f commit 7161ddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solutions/maximum-number-of-coins-you-can-get/solution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Solution {
std::ranges::sort(piles);

int ans = 0;
for (int i = piles.size() / 3; i < piles.size(); i += 2) {
for (int i = piles.size() / 3; i < std::ssize(piles); i += 2) {
ans += piles[i];
}
return ans;
Expand All @@ -43,7 +43,7 @@ class Solution {
}

int ans = 0;
for (int i = piles.size() / 3; i < piles.size(); i += 2) {
for (int i = piles.size() / 3; i < std::ssize(piles); i += 2) {
ans += piles[i];
}
return ans;
Expand Down

0 comments on commit 7161ddc

Please sign in to comment.