an interesting problem

Revision en1, by TuHoangAnh, 2022-02-18 16:12:28

there are n piles of coin, each pile has A[i] coints. Alice and Peter want to play a game. They play alternatively, on each move, they can remove some coins from any piles.The winner is the last person to remove all coins from the last pile. in the begining, they can know who is the winner, so the loser will maximize the number of moves and the winner will try to minimize it. Printf the number of moves if both players play optimally.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English TuHoangAnh 2022-02-18 16:19:50 8 Tiny change: ' of coin, each pile has' -> ' of coin, the i'th pile has'
en1 English TuHoangAnh 2022-02-18 16:12:28 460 Initial revision (published)