結果

問題 No.349 干支の置き物
ユーザー tsuchinaga
提出日時 2019-02-27 13:18:45
言語 Go
(1.23.4)
結果
WA  
実行時間 -
コード長 342 bytes
コンパイル時間 9,728 ms
コンパイル使用メモリ 235,368 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 05:06:59
合計ジャッジ時間 10,784 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import "fmt"

func main() {
	var n, max int
	s := ""
	_, _ = fmt.Scan(&n)
	e := make(map[string]int, 0)
	for i := 0; i < n; i++ {
		_, _ = fmt.Scan(&s)
		if _, ok := e[s]; ok {
			e[s]++
		} else {
			e[s] = 1
		}

		if max < e[s] {
			max = e[s]
		}
	}

	if n/2 >= max {
		fmt.Println("YES")
	} else {
		fmt.Println("NO")
	}
}
0