結果
| 問題 | No.586 ダブルブッキング | 
| コンテスト | |
| ユーザー | 👑 | 
| 提出日時 | 2020-01-16 18:09:46 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 345 bytes | 
| コンパイル時間 | 761 ms | 
| コンパイル使用メモリ | 74,540 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-23 23:31:16 | 
| 合計ジャッジ時間 | 1,394 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 5 | 
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    int a,b,n;cin>>a>>b>>n;
    vector<int> z(n);
    for(int i = 0; n > i; i++){
        cin>>z[i];
    }
    int r = 0;
    sort(z.begin(),z.end());
    for(int i = 1; n > i; i++){
        if(z[i]==z[i-1])r++;
    }
    
    cout << (a+b)*r << endl;
}
            
            
            
        