纯属练习JAVA....
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner cin=new Scanner(System.in);
int n=cin.nextInt(),v=cin.nextInt();
int count=0;
StringBuilder ans= new StringBuilder();
for(int lll=0;lll<n;lll++)
{
int k=cin.nextInt();
boolean flag=false;
for(int i=0;i<k;i++)
{
int temp=cin.nextInt();
if(temp<v)
{
flag=true;
}
}
if(flag)
{
count++;
ans.append((lll+1)+" ");
}
}
System.out.println(count);
System.out.println(ans.toString().trim());
}
}