Global Round 10 — Problem B

Revision en1, by Essam, 2020-08-25 04:50:42

Hello https://mirror.codeforces.com/contest/1392/problem/B I dont understand why my code fails? https://ideone.com/OvJGfP

Algo: if k is odd : then -=max from every element. if k is even: then dont do anything because the subtractions will eliminate each other like max-(max-x) = x

Thanks,

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Essam 2020-08-25 04:50:42 334 Initial revision (published)