結果

問題 No.586 ダブルブッキング
ユーザー yuma220284
提出日時 2019-04-05 15:13:00
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 1,384 ms
コンパイル使用メモリ 165,088 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-11 17:05:51
合計ジャッジ時間 1,946 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;

int main() {
	int P1, P2, N, R, count = 0;
	map<int, int> mp;
	cin >> P1 >> P2 >> N;
	for (int i = 0; i < N; i++) {
		cin >> R;
		if (mp[R] != 0) count++;
		mp[R]++;
	}
	cout << (P1 + P2) * count << endl;
}
0