結果

問題 No.2770 Coupon Optimization
ユーザー srjywrdnprkt
提出日時 2023-11-15 21:41:18
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 618 bytes
コンパイル時間 3,223 ms
コンパイル使用メモリ 227,396 KB
最終ジャッジ日時 2025-02-17 22:12:17
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 1
other AC * 12 RE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/convolution>

using namespace std;
using namespace atcoder;
using ll = long long;


int main(){
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);

    ll N, M;
    cin >> N >> M;
    vector<ll> A(N), B(N), C;
    for (int i=0; i<N; i++){
        cin >> A[i];
        A[i] /= 100;
    }
    for (int i=0; i<M; i++){
        cin >> B[i];
        B[i] = 100-B[i];
    }
    for (int i=M; i<N; i++) B[i] = 100;
    sort(A.begin(), A.end());
    sort(B.begin(), B.end());

    C = convolution_ll(A, B);
    for (int i=0; i<N; i++) cout << C[i] << "\n";

    return 0;
}
0