結果

問題 No.586 ダブルブッキング
ユーザー Piroty19
提出日時 2019-06-26 17:30:43
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 437 ms
コンパイル使用メモリ 53,780 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-25 06:36:17
合計ジャッジ時間 1,036 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 2 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int main()
{
		int a, b, N;
		int R[1000];
		int n;
		int sum;
		int count = 0;

		cin >> a >> b >> N;
		for (int i = 0; i < N; i++)
		{
			cin >> n;
			if (R[n] == 0)
			{
				count++;
			}
			else
			{
				R[n] = 0;
			}
		}

		sum = (a + b)*count;

		cout << sum;
	
	return 0;
}
0