Problem F. Stone game
时间限制 1000 ms
内存限制 64 MB
Birdstorm and hahaha are playing a game. Given a DAG (
Directed acyclic graph) with n nodes and m edges. There are total k stones on the nodes and each node can contains more than one stone. Each turn, one can move at most two stones alone the edge, and he is lost if he can not move any one. Birdstorm move first and he wants to know how many ways to do his first operation that he can win the game.
输入数据
输出数据
Each test case, print one line, the number of ways.
样例输入
样例输出
$ Mathjax font initiator $