Codeforces Round #459 (Div. 2) D. MADMAX DFS+博弈
D. MADMAX time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output As we all know, Max is the best video game player among her friends. Her friends were so jealous of hers, that they created an actual game just to prove that she's not the best at games. The game is played on a directed acyclic graph (a DAG) with n vertices and m edges. There's a character written on each edge, a lowercase English letter. Max and Lucas are playing the game. Max goes first, then Lucas, then Max again and so on. Each player has a marble, initially located at