結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2017-08-02 18:14:59 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 60 ms / 2,000 ms |
| + 106µs | |
| コード長 | 555 bytes |
| 記録 | |
| コンパイル時間 | 1,620 ms |
| コンパイル使用メモリ | 87,300 KB |
| 実行使用メモリ | 43,252 KB |
| 最終ジャッジ日時 | 2026-09-13 19:15:39 |
| 合計ジャッジ時間 | 3,021 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int p1 = sc.nextInt();
int p2 = sc.nextInt();
int n = sc.nextInt();
ArrayList<Integer> li = new ArrayList<Integer>();
for(int i = 0 ; i < n ; i++) {
int r = sc.nextInt();
li.add(r);
}
HashSet<Integer> hs = new HashSet<Integer>(li);
int a = n - hs.size();
System.out.println(a * p1 + a * p2);
}
}
No