結果

問題 No.586 ダブルブッキング
ユーザー michonz4
提出日時 2019-10-22 23:42:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 509 ms
コンパイル使用メモリ 61,996 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-05 03:01:32
合計ジャッジ時間 1,228 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <set>

using namespace std;

int main() {
  int p1, p2, n, c;
  cin >> p1 >> p2 >> n;
  set<int> st;

  for (int i=0; i<n; i++) {
    int r;
    cin >> r;
    st.insert(r);
  }

  c=n-st.size();
  cout << (p1*c)+(p2*c) << endl;
  return 0;
}
0