Skip to content

Commit

Permalink
Update cf-276C.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
Sosuke23 authored Jan 14, 2025
1 parent 453bcb5 commit b81c88f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solutions/silver/cf-276C.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ int main() {

for (int i = 1; i <= n; i++) { freq[i] += freq[i - 1]; }

std::sort(rbegin(freq), rend(freq));
std::sort(rbegin(arr), rend(arr));
sort(rbegin(freq), rend(freq));
sort(rbegin(arr), rend(arr));

long long res = 0;
for (int i = 0; i < n; i++) { res += 1LL * freq[i] * arr[i]; }
Expand Down

0 comments on commit b81c88f

Please sign in to comment.