結果
問題 | No.586 ダブルブッキング |
ユーザー |
![]() |
提出日時 | 2020-02-06 01:53:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 270 bytes |
コンパイル時間 | 752 ms |
コンパイル使用メモリ | 71,488 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 10:46:16 |
合計ジャッジ時間 | 1,256 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <iostream> #include <set> using namespace std; int main(void) { int p1, p2, n, r; cin >> p1 >> p2 >> n; set<int> st; for (int i = 0; i < n; ++i) { cin >> r; st.insert(r); } int diff = n - st.size(); cout << p1 * diff + p2 * diff << endl; return 0; }