結果
問題 | No.586 ダブルブッキング |
ユーザー |
![]() |
提出日時 | 2020-06-12 20:26:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 476 bytes |
コンパイル時間 | 1,094 ms |
コンパイル使用メモリ | 96,752 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-24 04:11:18 |
合計ジャッジ時間 | 1,541 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include<iostream> #include<math.h> #include<string.h> #include<vector> #include<algorithm> #include<iomanip> #include<deque> #include<map> #include<stdio.h> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int p1,p2; cin >> p1 >> p2; int n; cin >> n; map<int,int> mp; for(int i=0;i<n;i++){ int x; cin >> x; mp[x]++; } int cnt=0; for(auto p : mp){ cnt+=(p.second-1); } int ans=cnt*(p1+p2); cout << ans << endl; return 0; }