当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6285:Vertex Cover

题目描述
Alice and Bobo are playing a game on a graph with $n$ vertices numbered with $0, 1, \dots, (n - 1)$.
The vertex numbered with $i$ is associated with weight $2^i$.

The game is played as follows.
Firstly, Alice chooses a (possibly empty) subset of the $\frac{n(n - 1)}{2}$ edges.
Subsequently Bobo chooses a (possibly empty) subset of the $n$ vertices to *cover* the edges chosen by Alice.
An edge is *covered* if one of its two ends is chosen by Bobo.
As Bobo is smart, he will choose a subset of vertices whose sum of weights, denoted as $S$, is minimum.

Alice would like to know the number of subsets of edges where Bobo will choose a subset whose sum of weights is exactly $k$ (i.e. $S = k$), modulo $(10^9+7)$.
输入解释
The input consists of several test cases and is terminated by end-of-file.

Each test case contains two integers $n$ and $k$.
For convenience, the number $k$ is given in its binary notation.
输出解释
For each test case, print an integer which denotes the result.

## Constraint

* $1 \leq n \leq 10^5$
* $0 \leq k < 2^n$
* The sum of $n$ does not exceed $250,000$.
输入样例
3 1
4 101
10 101010101
输出样例
3
12
239344570
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6285

最后修改于 2020-10-25T23:29:58+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)