解决这个问题,博弈分析理论对你有很大帮助: https://e-maxx.ru/algo/games_on_graphs
1000 ms 256 Mb Rules for program design and list of errors in automatic problem checking