結果
| 問題 | No.586 ダブルブッキング | 
| コンテスト | |
| ユーザー |  hogeover30 | 
| 提出日時 | 2018-01-14 17:48:12 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 2,000 ms | 
| コード長 | 237 bytes | 
| コンパイル時間 | 2,136 ms | 
| コンパイル使用メモリ | 200,008 KB | 
| 最終ジャッジ日時 | 2025-01-05 07:31:09 | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 5 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int p1, p2, n;
    cin>>p1>>p2>>n;
    map<int, int> a;
    for(int r; cin>>r; ++a[r]);
    int res=0;
    for(auto& [x, y]: a) res+=(p1+p2)*(y-1);
    cout<<res<<endl;
}
            
            
            
        