Need Proof for Alice–Bob Array Game

Revision en1, by Gokboru, 2025-09-25 13:09:05

Hello Codeforces,

I recently solved the problem about Alice and Bob playing on an array (choose value x, gain points equal to its frequency, then decrease those x by 1). My solution was accepted during the contest(339599945).

However, I am still not fully confident about the proof of correctness. I would really appreciate it if someone could provide a clear proof or explanation showing why this greedy strategy is optimal.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Gokboru 2025-09-25 13:09:05 468 Initial revision (published)