結果
問題 | No.182 新規性の虜 |
ユーザー | yuki2006 |
提出日時 | 2015-04-15 18:59:43 |
言語 | Go1.4 (1.4.2) |
結果 |
AC
|
実行時間 | 52 ms / 5,000 ms |
コード長 | 948 bytes |
コンパイル時間 | 2,640 ms |
コンパイル使用メモリ | 34,676 KB |
実行使用メモリ | 7,952 KB |
最終ジャッジ日時 | 2023-08-27 17:10:05 |
合計ジャッジ時間 | 4,455 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 1 ms
4,380 KB |
testcase_06 | AC | 1 ms
4,376 KB |
testcase_07 | AC | 1 ms
4,376 KB |
testcase_08 | AC | 31 ms
4,932 KB |
testcase_09 | AC | 52 ms
7,952 KB |
testcase_10 | AC | 48 ms
7,724 KB |
testcase_11 | AC | 43 ms
7,508 KB |
testcase_12 | AC | 16 ms
4,376 KB |
testcase_13 | AC | 1 ms
4,380 KB |
testcase_14 | AC | 1 ms
4,376 KB |
testcase_15 | AC | 1 ms
4,380 KB |
testcase_16 | AC | 1 ms
4,376 KB |
testcase_17 | AC | 1 ms
4,380 KB |
testcase_18 | AC | 22 ms
4,380 KB |
testcase_19 | AC | 17 ms
4,380 KB |
testcase_20 | AC | 12 ms
4,380 KB |
testcase_21 | AC | 25 ms
4,376 KB |
testcase_22 | AC | 14 ms
4,376 KB |
testcase_23 | AC | 1 ms
4,380 KB |
testcase_24 | AC | 48 ms
7,880 KB |
testcase_25 | AC | 17 ms
4,376 KB |
testcase_26 | AC | 8 ms
4,380 KB |
testcase_27 | AC | 1 ms
4,380 KB |
evil01.txt | AC | 57 ms
8,376 KB |
evil02.txt | AC | 58 ms
8,372 KB |
ソースコード
package main import ( "bufio" "os" "strconv" "math/rand" "fmt" "strings" ) var s = bufio.NewScanner(os.Stdin) func next() string { s.Split(bufio.ScanWords) s.Scan() return s.Text() } func nextLine() string { s.Split(bufio.ScanLines) s.Scan() if nil != s.Err() { panic(s.Err()) } return s.Text() } func nextInt() int { i, e := strconv.Atoi(next()) if e != nil { panic(e) } return i } func randInt(a int , b int) int { return rand.Intn(b - a + 1) + a } func mapToString(arr []int) []string { ret := make([]string, len(arr)) for i := 0; i < len(arr); i++ { ret[i] = strconv.Itoa(arr[i]) } return ret } func PrintI(args ...int) { fmt.Println(strings.Join(mapToString(args), " ")) } func main() { N := nextInt() A := make([]int, N) var set = map[int]int{} for i := 0; i < N; i++ { A[i] = nextInt() set[A[i]] +=1 } var ans = 0 for _, v := range set { if v == 1 { ans++ } } PrintI(ans) }