結果
| 問題 |
No.586 ダブルブッキング
|
| コンテスト | |
| ユーザー |
moti
|
| 提出日時 | 2018-05-14 23:12:41 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 430 bytes |
| コンパイル時間 | 15,068 ms |
| コンパイル使用メモリ | 223,260 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-06-28 11:51:48 |
| 合計ジャッジ時間 | 11,465 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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