题库练习 Sereja and Sets
← 上一题 下一题 →

A9374 | Sereja and Sets

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

Let's assume that set $S$ consists of $m$ distinct intervals $[l_{1},r_{1}]$ , $[l_{2},r_{2}]$ , $...$ , $[l_{m},r_{m}]$ ( $1<=l_{i}<=r_{i}<=n$ ; $l_{i},r_{i}$ are integers).

Let's assume that $f(S)$ is the maximum number of intervals that you can choose from the set $S$ , such that every two of them do not intersect. We assume that two intervals, $[l_{1},r_{1}]$ and $[l_{2},r_{2}]$ , intersect if there is an integer $x$ , which meets two inequalities: $l_{1}<=x<=r_{1}$ and $l_{2}<=x<=r_{2}$ .

Sereja wonders, how many sets $S$ are there, such that $f(S)=k$ ? Count this number modulo $1000000007$ $(10^{9}+7)$ .

输入格式

The first line contains integers $n$ , $k$ $(1<=n<=500; 0<=k<=500)$ .

输出格式

In a single line, print the answer to the problem modulo $1000000007$ $(10^{9}+7)$ .

输入输出样例

输入 #1
3 1
输出 #1
23
输入 #2
3 2
输出 #2
32
输入 #3
2 0
输出 #3
1
输入 #4
2 2
输出 #4
2
C++ 编辑器
输入
输出