#include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N, M; cin >> N >> M; vector A(N), B(M); for (auto &x : A) cin >> x, x /= 100; for (auto &x : B) cin >> x; sort(A.begin(), A.end()); sort(B.rbegin(), B.rend()); const auto C = atcoder::convolution_ll(A, B); long long ret = 0; for (int i = 0; i < N; ++i) { ret += A.at(i) * 100; cout << ret - C.at(i) << '\n'; } }