結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
Takeno_hito
|
| 提出日時 | 2017-11-04 17:19:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 672 bytes |
| 記録 | |
| コンパイル時間 | 809 ms |
| コンパイル使用メモリ | 83,412 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-23 18:02:00 |
| 合計ジャッジ時間 | 1,290 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <string>
#include <set>
#define INF 100000000000
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define LOOP(i,N) for(int i=0;i<N;i++)
typedef pair<int,int> P;
typedef pair<int,pair<int,int> > PP;
// #define int long long
/* define/include */
int main(){
//まっぷ に つっこんで えい!w
map<int,int> ma;
int p1,p2;
cin >> p1;
cin >> p2;
int p=p1+p2;
int n;
cin >> n;
for(int i=0;i<n;i++){
int r;
cin >> r;
ma[r]++;
}
int ans=0;
for(auto itr:ma){
ans+=itr.second-1;
}
cout << ans*p << endl;
}
Takeno_hito