結果
| 問題 | 
                            No.2770 Coupon Optimization
                             | 
                    
| コンテスト | |
| ユーザー | 
                             FplusFplusF
                         | 
                    
| 提出日時 | 2024-05-31 23:03:05 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 255 ms / 3,000 ms | 
| コード長 | 925 bytes | 
| コンパイル時間 | 4,384 ms | 
| コンパイル使用メモリ | 281,444 KB | 
| 実行使用メモリ | 22,984 KB | 
| 最終ジャッジ日時 | 2024-12-21 01:17:49 | 
| 合計ジャッジ時間 | 9,508 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 16 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll,ll>;
using ld=long double;
const ll INF=(1ll<<60);
#define rep(i,n) for (ll i=0;i<(ll)(n);i++)
#define all(v) v.begin(),v.end()
template<class T> inline bool chmin(T &a,T b){
    if(a>b){
        a=b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T &a,T b){
    if(a<b){
        a=b;
        return true;
    }
    return false;
}
#include<atcoder/convolution>
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll n,m;
    cin >> n >> m;
    vector<ll> 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));
    while((ll)b.size()<n) b.push_back(100);
    vector<ll> ans=atcoder::convolution_ll(a,b);
    rep(i,n) cout << ans[i] << '\n';
}
            
            
            
        
            
FplusFplusF