結果
問題 | No.2770 Coupon Optimization |
ユーザー |
![]() |
提出日時 | 2024-05-31 22:02:20 |
言語 | C++23 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 268 ms / 3,000 ms |
コード長 | 1,046 bytes |
コンパイル時間 | 4,456 ms |
コンパイル使用メモリ | 301,844 KB |
実行使用メモリ | 23,016 KB |
最終ジャッジ日時 | 2024-05-31 22:02:32 |
合計ジャッジ時間 | 9,043 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,812 KB |
testcase_01 | AC | 2 ms
6,940 KB |
testcase_02 | AC | 3 ms
6,940 KB |
testcase_03 | AC | 229 ms
23,016 KB |
testcase_04 | AC | 235 ms
22,828 KB |
testcase_05 | AC | 17 ms
6,940 KB |
testcase_06 | AC | 237 ms
22,824 KB |
testcase_07 | AC | 232 ms
22,888 KB |
testcase_08 | AC | 248 ms
22,956 KB |
testcase_09 | AC | 62 ms
7,344 KB |
testcase_10 | AC | 118 ms
12,604 KB |
testcase_11 | AC | 105 ms
10,900 KB |
testcase_12 | AC | 139 ms
14,268 KB |
testcase_13 | AC | 124 ms
12,388 KB |
testcase_14 | AC | 256 ms
22,848 KB |
testcase_15 | AC | 256 ms
22,800 KB |
testcase_16 | AC | 268 ms
22,952 KB |
testcase_17 | AC | 258 ms
22,952 KB |
ソースコード
#include<bits/stdc++.h> namespace { #pragma GCC diagnostic ignored "-Wunused-function" #include<atcoder/all> #pragma GCC diagnostic warning "-Wunused-function" using namespace std; using namespace atcoder; #define rep(i,n) for(int i = 0; i < (int)(n); i++) #define rrep(i,n) for(int i = (int)(n) - 1; i >= 0; i--) #define all(x) begin(x), end(x) #define rall(x) rbegin(x), rend(x) template<class T> bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } else return false; } template<class T> bool chmin(T& a, const T& b) { if (b < a) { a = b; return true; } else return false; } using ll = long long; using P = pair<int,int>; using VI = vector<int>; using VVI = vector<VI>; using VL = vector<ll>; using VVL = vector<VL>; } int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; VL a(n), b(m); rep(i, n) cin >> a[i], a[i] /= 100; sort(all(a)); rep(i, m) cin >> b[i], b[i] = 100 - b[i]; sort(all(b)); b.resize(n, 100); auto res = convolution_ll(a, b); rep(i, n) cout << res[i] << '\n'; }