CF623E.Transforming Sequence
NOI/NOI+/CTSC
通过率:0%
时间限制:7.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Let's define the transformation P of a sequence of integers _a_1, _a_2, ..., a__n as _b_1, _b_2, ..., b__n, where b__i = _a_1 | _a_2 | ... | a__i for all i = 1, 2, ..., n, where | is the bitwise OR operation.
Vasya consequently applies the transformation P to all sequences of length n consisting of integers from 1 to 2_k_ - 1 inclusive. He wants to know how many of these sequences have such property that their transformation is a strictly increasing sequence. Help him to calculate this number modulo 109 + 7.
我们定义整数序列 a1,a2,…,an 的变换 P 为序列 b1,b2,…,bn,其中对所有 i=1,2,…,n,有 bi=a1∣a2∣⋯∣ai,其中 ∣ 表示按位或(bitwise OR)运算。
瓦夏依次将变换 P 应用于所有长度为 n、且每个元素均取自 1 到 2k−1(含端点)的整数序列。他想知道:在这些序列中,有多少个序列满足其变换结果是一个严格递增序列?请你帮他计算该数目对 109+7 取模的结果。
输入格式
The only line of the input contains two integers n and k (1 ≤ n ≤ 1018, 1 ≤ k ≤ 30 000).
输入仅包含一行,有两个整数 n 和 k(1 ≤ n ≤ 1018,1 ≤ k ≤ 30000)。
输出格式
Print a single integer — the answer to the problem modulo 109 + 7.
输出一个整数——该问题答案对 109+7 取模的结果。
输入输出样例
输入#1
1 2
输出#1
3
输入#2
2 3
输出#2
30
输入#3
3 3
输出#3
48
输入解题思路,AI测评打分。不知道怎么写?