{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eAlice and Bobo are playing a game on a graph with $n$ vertices numbered with $0, 1, \\dots, (n - 1)$.\u003cbr\u003eThe vertex numbered with $i$ is associated with weight $2^i$.\u003cbr\u003e\u003cbr\u003eThe game is played as follows.\u003cbr\u003eFirstly, Alice chooses a (possibly empty) subset of the $\\frac{n(n - 1)}{2}$ edges.\u003cbr\u003eSubsequently Bobo chooses a (possibly empty) subset of the $n$ vertices to *cover* the edges chosen by Alice.\u003cbr\u003eAn edge is *covered* if one of its two ends is chosen by Bobo.\u003cbr\u003eAs Bobo is smart, he will choose a subset of vertices whose sum of weights, denoted as $S$, is minimum.\u003cbr\u003e\u003cbr\u003eAlice 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 \u003d k$), modulo $(10^9+7)$.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input consists of several test cases and is terminated by end-of-file.\u003cbr\u003e\u003cbr\u003eEach test case contains two integers $n$ and $k$.\u003cbr\u003eFor convenience, the number $k$ is given in its binary notation.\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, print an integer which denotes the result.\u003cbr\u003e\u003cbr\u003e## Constraint\u003cbr\u003e\u003cbr\u003e* $1 \\leq n \\leq 10^5$\u003cbr\u003e* $0 \\leq k \u0026lt; 2^n$\u003cbr\u003e* The sum of $n$ does not exceed $250,000$.\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3 1\r\n4 101\r\n10 101010101\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\r\n12\r\n239344570\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}