結果
| 問題 | No.586 ダブルブッキング |
| コンテスト | |
| ユーザー |
moti
|
| 提出日時 | 2018-05-14 23:12:41 |
| 言語 | Go (1.25.7) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 430 bytes |
| 記録 | |
| コンパイル時間 | 10,347 ms |
| コンパイル使用メモリ | 283,628 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2026-03-17 04:16:01 |
| 合計ジャッジ時間 | 10,860 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
func nextInt() int {
sc.Scan()
i, err := strconv.Atoi(sc.Text())
if err != nil {
panic(err)
}
return i
}
func main() {
sc.Split(bufio.ScanWords)
p1 := nextInt()
p2 := nextInt()
n := nextInt()
rs := make(map[int]struct{})
for i := 0; i < n; i++ {
rs[nextInt()] = struct{}{}
}
fmt.Println((n - len(rs)) * (p1 + p2))
}
moti