結果
問題 |
No.586 ダブルブッキング
|
ユーザー |
![]() |
提出日時 | 2017-11-23 19:52:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 568 bytes |
コンパイル時間 | 1,300 ms |
コンパイル使用メモリ | 59,632 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-27 05:56:52 |
合計ジャッジ時間 | 2,542 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 5 |
ソースコード
#include <iostream> #include <vector> using namespace std; int main(){ int a, b, n; vector<int> record; int count = 0; int judge = 0; cin >> a; cin >> b; cin >> n; int c[n]; for(int i = 0; i < n; i++){ cin >> c[i]; } record[0] = c[0]; for(int i = 0; i < n; i++){ for(int j = 0; j < record.size(); j++){ if(c[i] == record[j]){ count++; }else{ judge++; } } if(judge != record.size()){ record.push_back(c[i]); } judge = 0; } cout << (a + b) * (count - 1) / 2 << endl; return 0; }