結果
| 問題 |
No.586 ダブルブッキング
|
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-01-12 23:13:45 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 363 bytes |
| コンパイル時間 | 582 ms |
| コンパイル使用メモリ | 64,664 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 00:51:16 |
| 合計ジャッジ時間 | 1,008 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int P1,P2,N,x,count=0;
vector<int> R;
cin >> P1 >> P2 >> N;
for(int i=0;i<N;i++){
cin >> x;
R.push_back(x);
}
sort(R.begin(),R.end());
for(int i=0;i<N-1;i++){
if(R[i]==R[i+1]) count++;
}
cout << count*(P1+P2);
}
focus