CF1039C Network Safety
题目描述
题意:
给你一个有$n$点个和$m$条边的图,第$i$个点的权值为$c_i$。
定义图为安全的条件对于所有的边都保证$c_l≠c_r$
请你求出对于任意的$x$,集合$s$中所有点的点权$xor\quad x$后图仍然安全,这样的$x$和$s$的组合的数量。
答案对于$1e9+7$取模
保证一开始给出的图是安全的。
输入格式
无
输出格式
无
说明/提示
Consider the first example.
Possible values for the number $ x $ contained by the virus are $ 0 $ , $ 1 $ , $ 2 $ and $ 3 $ .
For values $ 0 $ , $ 2 $ and $ 3 $ the virus can infect any subset of the set of servers, which gives us $ 16 $ pairs for each values. A virus containing the number $ 1 $ can infect either all of the servers, or none. This gives us $ 16 + 2 + 16 + 16 = 50 $ pairs in total.