Help with a problem

Revision en2, by bitencode, 2021-10-07 09:41:38

Problem Link : Problem

Initially unable to solve it I went through editorial, then found that it tells that answer is the count of set bits. Although I get the intuition, but can we prove that counting the bits would give the minimal answer? Please help, thanks in advance.

My Solution : MySubmission

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English bitencode 2021-10-07 09:41:38 39
en1 English bitencode 2021-10-07 09:39:54 422 Initial revision (published)