結果
| 問題 |
No.586 ダブルブッキング
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-03 23:47:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 358 bytes |
| コンパイル時間 | 441 ms |
| コンパイル使用メモリ | 54,884 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-28 14:58:25 |
| 合計ジャッジ時間 | 949 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <iostream>
using namespace std;
int room[1000] = {0};
int bookking = 0;
int yuki, other;
int main(){
cin >> yuki >> other;
int n; cin >> n;
int res;
for(int i = 0; i < n; i++){
cin >> res;
if(room[res] == 1) bookking += 1;
room[res] = 1;
}
cout << bookking * (yuki + other) << endl;
return 0;
}