测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A9374. Sereja and Sets

编程题 普及/提高-

题目描述

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
上一题 去做题 下一题