CMIMC 2018 Power Problem 5.3

Assume that c_{i}=c_{j} now (but the player does not know this in advance). Find a strategy which guarantees at least one of the following two things, in at most 3 c_{i} turns:

  • the strategy determines both cycles C_{i} and C_{j} completely (which may even be the same cycle), or
  • all 2 c_{i} cards are matched (and thus remain face up thereafter).