Yennefer or Triss
CodeChefOpen on judge ↗
Geralt of Rivia has accepted a contract to kill a deadly monster in a nearby forest. He is allowed to choose at most one mage to help him fight the monster. He can choose between Yennefer and Triss to help him. In order to make a decision, Geralt looked at his past $N$ contracts. In each of his past contracts, Geralt either took the help of only one of the mages or no help at all. For the current
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start