### valeriu's blog

By valeriu, history, 18 months ago, ## 103422A - MLCS

Problem author : Gheal

Solution

## 103422B - Gorbachev Sort

Problem author : valeriu

Hint 1
Hint 2
Solution

## 103422C - Charity

Problem authors : tibinyte + Gheal

Solution

Thanks for participating in this round ! Also , we would love if you could share your thoughts about this round ( how were the problems , what could be improved in the future etc ) Tutorial of Infoleague Autumn 2021 Round 2 Div. 2  Comments (3)
 » thanks a lot for your efforts.
 » can anyone help me why my code gives only 95 points on question c charity which testcase i am missing. Spoilervoid solve(){ ll n,k; cin>>n>>k;vectorv(n);for(ll i=0;i>v[i]; }priority_queuepq;ll sum=0;ll cnt=0;for(ll i=0;i=z){if(cntz){ll z2=pq.top();sum+=z2;pq.pop();sum-=z;pq.push(z);} } } else{if(pq.empty()==false && pq.top()>z ){ll z2=pq.top();sum+=z2;pq.pop();sum-=z;pq.push(z);} } } else{sum+=v[i]; }} cout<
•  » » You should output -1 if there is no solution.