Bharath And His Game
CodeChefOpen on judge ↗
Bharath and Vinish are playing a game on Directed Acyclic Graphs. Each node in the DAG has certain coins in it.During each move a player can pick one coin from node A and move to node B iff there is a path from node A to node B in the graph.The player who makes the last move wins.Assuming that both of them play optimally and Bharath starts the game, find the winner. Input First line will contain
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