#include using namespace std; using ll = long long; using llu = long long unsigned; int main() { int N, M; cin >> N >> M; vector A(M); for (auto &x : A) { cin >> x; } vector> T(N, vector(M)); for (uint i=0; i> T[i][j]; } } //for (auto x : A) { cout << x << " "; } cout << endl; //for (auto x : T) { // for (auto y : x) { cout << y << " "; } cout << endl; //} vector ret(N, -1); vector data(M, 0); for (uint j=0; j