#include #include #include #include #include using namespace std; using ull = unsigned long long; #define Mod %1000000007 int main() { ull N, M; cin >> N >> M; char op; cin >> op; vector b(M); for (auto itr = b.begin(); itr != b.end(); ++itr) cin >> *itr; vector a(N); for (auto itr = a.begin(); itr != a.end(); ++itr) cin >> *itr; for (int i = 0; i < N; ++i) { for (int j = 0; j < M; ++j) { if (op == '+') cout << a[i] + b[j] << " "; else cout << a[i] * b[j] << " "; } cout << endl; } return 0; }