Codeforces Round 252 (Div. 2)
A
Valera and Antique Items
Codeforces
1000
原题
←B →
翻译中…

Valera is a collector. Once he wanted to expand his collection with exactly one antique item.

翻译中…

Valera knows $*n*$ sellers of antiques, the $*i*$-th of them auctioned $*k*_{*i*}$ items. Currently the auction price of the $*j*$-th object of the $*i*$-th seller is $*s*_{*ij*}$. Valera gets on well with each of the $*n*$ sellers. He is perfectly sure that if he outbids the current price of one of the items in the auction (in other words, offers the seller the money that is strictly greater than the current price of the item at the auction), the seller of the object will immediately sign a contract with him.

翻译中…

Unfortunately, Valera has only $*v*$ units of money. Help him to determine which of the $*n*$ sellers he can make a deal with.

翻译中…

Input

翻译中…

The first line contains two space-separated integers $*n*, *v*$ $(1 ≤ *n* ≤ 50; 10^{4} ≤ *v* ≤ 10^{6})$ — the number of sellers and the units of money the Valera has.

翻译中…

Then $*n*$ lines follow. The $*i*$-th line first contains integer $*k*_{*i*}$ $(1 ≤ *k*_{*i*} ≤ 50)$ the number of items of the $*i*$-th seller. Then go $*k*_{*i*}$ space-separated integers $*s*_{*i*1}, *s*_{*i*2}, ..., *s*_{*ik*_{*i*}}$ $(10^{4} ≤ *s*_{*ij*} ≤ 10^{6})$ — the current prices of the items of the $*i*$-th seller.

翻译中…

Output

翻译中…

In the first line, print integer $*p*$ — the number of sellers with who Valera can make a deal.

翻译中…

In the second line print $*p*$ space-separated integers $*q*_{1}, *q*_{2}, ..., *q*_{*p*}$ $(1 ≤ *q*_{*i*} ≤ *n*)$ — the numbers of the sellers with who Valera can make a deal. Print the numbers of the sellers in the increasing order.

翻译中…

Note

翻译中…

In the first sample Valera can bargain with each of the sellers. He can outbid the following items: a $40000$ item from the first seller, a $20000$ item from the second seller, and a $10000$ item from the third seller.

翻译中…

In the second sample Valera can not make a deal with any of the sellers, as the prices of all items in the auction too big for him.

翻译中…

样例

Input #1
3 50000
1 40000
2 20000 60000
3 10000 70000 190000
Output #1
3
1 2 3
InputCopy OutputCopy
Input #2
3 50000
1 50000
3 100000 120000 110000
3 120000 110000 120000
Output #2
0
InputCopy OutputCopy
题目信息
题号
441A
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。