結果

問題 No.349 干支の置き物
ユーザー tookunn_1213
提出日時 2016-03-11 23:34:59
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-11-17 07:24:20
合計ジャッジ時間 1,183 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

eto = {"ne":0,"ushi":0,"tora":0,"u":0,"tatsu":0,"mi":0,"uma":0,"hitsuji":0,"saru":0,"tori":0,"inu":0,"i":0}
N = int(raw_input())
for i in range(N):
	eto[raw_input()] += 1
s = 0
m = 0
for i in eto.keys():
	s += eto[i]
	m = max(m,eto[i])
if s % 2 == 0:	
	if s / 2 >= m:
		print 'YES'
	else:
		print 'NO'
else:
	if s / 2 + 1 >= m:
		print 'YES'
	else:
		print 'NO'
0