結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-18 16:19:38 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 460µs | |
| コード長 | 347 bytes |
| 記録 | |
| コンパイル時間 | 304 ms |
| コンパイル使用メモリ | 74,216 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-29 04:36:59 |
| 合計ジャッジ時間 | 1,326 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main()
{
int p, pp, n, r[1000] = {}; cin >> p >> pp >> n;
for (int i = 0; i < n; i++) {
int t; cin >> t;
r[t]++;
}
int cnt = 0;
for (auto x : r) if (x > 1) cnt += x - 1;
cout << cnt * (p + pp) << endl;
return 0;
}