func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, x, ans;   priority_queue<long long> q;   int main() {     cin >> n;     for (int i = 1; i <= n; i++) {       cin >> x;       q.push(x);       if (q.top() > x) {         ans += q.top() - x;         q.pop();         q.push(x);       }     }     cout << ans;     return 0;   }   