結果

問題 No.2770 Coupon Optimization
ユーザー Today03Today03
提出日時 2024-06-01 04:22:14
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 334 ms / 3,000 ms
コード長 582 bytes
コンパイル時間 3,458 ms
コンパイル使用メモリ 237,644 KB
実行使用メモリ 23,056 KB
最終ジャッジ日時 2024-06-01 04:22:25
合計ジャッジ時間 10,622 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 1 ms
5,248 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 284 ms
23,056 KB
testcase_04 AC 311 ms
22,924 KB
testcase_05 AC 53 ms
11,188 KB
testcase_06 AC 310 ms
22,924 KB
testcase_07 AC 291 ms
22,928 KB
testcase_08 AC 328 ms
23,052 KB
testcase_09 AC 133 ms
11,516 KB
testcase_10 AC 152 ms
12,704 KB
testcase_11 AC 124 ms
11,100 KB
testcase_12 AC 256 ms
16,052 KB
testcase_13 AC 160 ms
12,768 KB
testcase_14 AC 334 ms
23,056 KB
testcase_15 AC 330 ms
22,928 KB
testcase_16 AC 329 ms
22,928 KB
testcase_17 AC 324 ms
23,052 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9 + 10;
const ll INFL = 4e18;

#include <atcoder/convolution>

int main() {
    int N, M;
    cin >> N >> M;
    vector<ll> A(N), B(max(N, M), 100);
    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];
    }
    sort(A.begin(), A.end());
    sort(B.begin(), B.end());

    auto C = atcoder::convolution_ll(A, B);

    for (int i = 0; i < N; i++) {
        cout << C[i] << '\n';
    }
}
0