結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-01 15:11:04 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 395 bytes |
| 記録 | |
| コンパイル時間 | 1,231 ms |
| コンパイル使用メモリ | 186,344 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-13 17:48:15 |
| 合計ジャッジ時間 | 2,054 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<(n); ++i)
using namespace std;
using ll=long long;
int main(){
int p1,p2,n;
cin>>p1>>p2>>n;
vector<int>r(n);
set<int>se;
int ans=0;
rep(i,n){
cin>>r[i];
if(se.find(r[i])==se.end()){
se.insert(r[i]);
}
else{
ans+=p1+p2;
}
}
cout<<ans<<endl;
}