結果
問題 |
No.2770 Coupon Optimization
|
ユーザー |
![]() |
提出日時 | 2024-05-31 23:26:43 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 242 ms / 3,000 ms |
コード長 | 628 bytes |
コンパイル時間 | 3,074 ms |
コンパイル使用メモリ | 225,996 KB |
最終ジャッジ日時 | 2025-02-21 18:37:11 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/convolution> using namespace std; using namespace atcoder; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n, m; cin >> n >> m; vector<long long> 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 f = convolution_ll(a, b); for (int i = 0; i < n; i++) { cout << f[i] << "\n"; } }