結果

問題 No.349 干支の置き物
ユーザー yamadatarouyamadatarou
提出日時 2016-03-11 23:27:51
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 7,068 KB
実行使用メモリ 6,456 KB
最終ジャッジ日時 2023-10-25 05:59:38
合計ジャッジ時間 1,591 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 RE -
testcase_04 RE -
testcase_05 WA -
testcase_06 RE -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 RE -
testcase_14 RE -
testcase_15 WA -
testcase_16 RE -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 RE -
testcase_23 WA -
testcase_24 RE -
testcase_25 WA -
testcase_26 RE -
testcase_27 WA -
testcase_28 WA -
testcase_29 RE -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()

LIST = [raw_input() for i in range(N)]

BBB = sorted(LIST)
CCC = list(set(BBB))
DDD = [0 for i in range(len(CCC))]
EEE = [CCC[i] for i in range(len(CCC))]

for i in range(len(EEE)):
  for j in range(len(BBB)):
    if BBB[j] == EEE[i]:
      DDD[i] += 1

FFF = sorted(DDD)

print DDD

if N%2 == 0:
  if DDD[0] <= N/2:
    print "YES"
  else:
    print "NO"
else:
  if DDD[0] <= N/2+1:
    print YES
  else:
    print "NO"
0