大佬来看看,哪里出问题了?
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int i = 0;
boolean b = false;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int m = sc.nextInt();
int k = sc.nextInt();
int t = 0;
int j = 0;
int ww=0;
String[] s = new String[2 * m];
Scanner sc1 = new Scanner(System.in);
String ey = sc1.nextLine();
String[] a = ey.split(" ");
for(i=0;i<2*m;i++)
{
s[i]=sc1.nextLine();
}
if (n >= 1 && n <= 50 && m >= 1 && m <= 50 && k >= 1 && k <= 50) {
for (i = 1; i < 2 * m; i = i + 2) {
for (j = 0; j < n; j++) {
b = s[i].contains(a[j]);
if (b == true) {
b = false;
t = t + 1;
}
}
if(t>=k)
{
System.out.println(s[i-1]);
ww=1;
}
}
}
if(ww==0){
System.out.println();
}
}
}