Game Routes

Two players play a token-moving game on a directed acyclic graph (DAG) with n nodes numbered from 0 to n-1. The token starts at node 0. Players alternate moving the token along a directed edge to an adjacent node. A player who cannot move (because the current node has no outgoing edges) loses. Both players play optimally. Determine whether the first player can force a win.

Examples
Input: [5,[[0,1],[0,2],[1,3],[2,3],[3,4]]]
Output: true
Hints

Game Routes

Two players play a token-moving game on a directed acyclic graph (DAG) with n nodes numbered from 0 to n-1. The token starts at node 0. Players alternate moving the token along a directed edge to an adjacent node. A player who cannot move (because the current node has no outgoing edges) loses. Both players play optimally. Determine whether the first player can force a win.