#include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ int a, n, m; string op, delim = ""; cin >> n >> m >> op; vector b(m); for (int i = 0; i < m; i++) cin >> b[i]; for (int i = 0; i < n; i++){ cin >> a; for (int j = 0; j < m; j++){ if (op == "+") cout << delim << a + b[j]; else cout << delim << a * b[j]; delim = " "; } cout << endl; delim = ""; } }