結果
| 問題 |
No.586 ダブルブッキング
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-11 23:12:47 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 390 bytes |
| コンパイル時間 | 5,264 ms |
| コンパイル使用メモリ | 210,316 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-09-11 23:12:54 |
| 合計ジャッジ時間 | 6,400 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long int p1,p2;
int n,r;
bool chk[1000];
long long int res = 0;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
cin >> p1;
cin >> p2;
cin >> n;
for(int i=0;i<n;i++)
{
cin >> r;
if(chk[r]) res += (p1+p2);
chk[r] = true;
}
cout << res << '\n';
return 0;
}