Skip to content

Commit

Permalink
Update ioi-07-sails.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
SansPapyrus683 authored Sep 19, 2024
1 parent cd5d4e0 commit f3f1e35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solutions/platinum/ioi-07-sails.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ int main() {

ll res = 0;
for (int i = 0; i < max_h; i++) {
int sail_cnt = bit.pref_sum(i);
res += 1ll * sail_cnt * (sail_cnt - 1) / 2;
int sail_num = bit.pref_sum(i);
res += 1ll * sail_num * (sail_num - 1) / 2;
}
cout << res << "\n";
}
Expand Down

0 comments on commit f3f1e35

Please sign in to comment.