結果
問題 | No.586 ダブルブッキング |
ユーザー |
![]() |
提出日時 | 2018-07-21 19:12:29 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 432 bytes |
コンパイル時間 | 571 ms |
コンパイル使用メモリ | 68,372 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 04:56:39 |
合計ジャッジ時間 | 1,151 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <fstream> #include <iostream> #include <vector> #include <algorithm> int main() { //std::ifstream inf("Text.txt"); std::cin.rdbuf(inf.rdbuf()); int P1, P2, N; std::cin >> P1 >> P2 >> N; std::vector<int> R(N); for (int i = 0; i < N; i++) { std::cin >> R[i]; } std::sort(R.begin(), R.end()); R.erase(std::unique(R.begin(), R.end()), R.end()); std::cout << (P1 + P2)*(N - R.size()) << std::endl; return 0; }