373C / 372A — Counting Kangaroos is Fun

Revision en2, by Colossus20, 2020-05-06 02:42:23

Hi!

I was solving this Counting Kangaroos is Fun problem, but after trying a (wrong) greedy aproach I read the editorial. However, I don't get it yet. Why can we assume that the first half of kangaroos do not hold any kangaroos, and last half of kangaroos are not held by any kangaroos ? And how should be assigned the kangaroos?

Any help will be apreciated.

Tags greedy, div2 c, div1 a

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Colossus20 2020-05-06 02:42:23 30
en1 English Colossus20 2020-05-06 02:39:46 534 Initial revision (published)