結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2017-08-02 18:14:59 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 60 ms / 2,000 ms |
| コード長 | 555 bytes |
| 記録 | |
| コンパイル時間 | 2,717 ms |
| コンパイル使用メモリ | 83,760 KB |
| 実行使用メモリ | 41,968 KB |
| 最終ジャッジ日時 | 2026-04-27 12:32:55 |
| 合計ジャッジ時間 | 3,812 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / 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