跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1387. Transforming Sequence

  • ID: 1393
  • 传统题
  • 2000ms
  • 256MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:挑战
  • 上传者:
  • 组合数学
  • 动态规划
  • FFT
  • 数学
  • 挑战
  • 难度
  • 共享题库
  • Codeforces
  • 英文题面
  • 题目来源
  • 题面语言

Transforming Sequence

题目描述

E. Transforming Sequence
time limit per test
7 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Let's define the transformation P of a sequence of integers a1,a2,...,an as b1,b2,...,bn, where bi=a1|a2|...|ai 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 2k-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.

Input

The only line of the input contains two integers n and k (1≤n≤1018,1≤k≤30000).

Output

Print a single integer− the answer to the problem modulo 109+7.

Examples
Input
1 2
Output
3
Input
2 3
Output
30
Input
3 3
Output
48

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 890 题。保留原作者与原赛事署名。