#include
using namespace std;
int main()
{
int n, k;
cout <<"n = ", cin >> n;
cout <<"k = ", cin >> k;
int A[n][k], D[k];
cout <<"A("<<n<<","<<k<<"):\n";<br> for(int i = 0; i < n; i++)
for(int j = 0; j < k; j++)
cin >> A[i][j];
cout <<"\nD("<<k<<"): ";<br> for(int i = 0; i < k; i++)
cin >> D[i];
int b;
for(int i = 0; i < n; i++)
{
b = 1;
for(int j = 0; j < k; j++)
if (D[j] != A[i][j]) b = 0;
if (b > 0) cout <<i<<" ";<br> }
return 0;
}