結果

問題 No.349 干支の置き物
ユーザー mkawa2mkawa2
提出日時 2020-01-01 18:41:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 964 bytes
コンパイル時間 533 ms
コンパイル使用メモリ 11,052 KB
実行使用メモリ 30,120 KB
最終ジャッジ日時 2023-08-14 15:58:19
合計ジャッジ時間 8,203 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
29,988 KB
testcase_01 AC 111 ms
29,960 KB
testcase_02 AC 114 ms
30,004 KB
testcase_03 AC 112 ms
30,056 KB
testcase_04 AC 108 ms
30,004 KB
testcase_05 AC 106 ms
29,844 KB
testcase_06 AC 110 ms
30,004 KB
testcase_07 AC 107 ms
29,912 KB
testcase_08 AC 106 ms
30,016 KB
testcase_09 AC 108 ms
29,960 KB
testcase_10 AC 111 ms
30,120 KB
testcase_11 AC 108 ms
29,812 KB
testcase_12 AC 106 ms
30,064 KB
testcase_13 AC 107 ms
29,972 KB
testcase_14 AC 109 ms
29,876 KB
testcase_15 AC 110 ms
30,024 KB
testcase_16 AC 110 ms
29,972 KB
testcase_17 AC 108 ms
30,064 KB
testcase_18 AC 113 ms
29,976 KB
testcase_19 AC 108 ms
29,984 KB
testcase_20 AC 106 ms
30,056 KB
testcase_21 AC 107 ms
29,916 KB
testcase_22 AC 106 ms
29,860 KB
testcase_23 AC 106 ms
29,832 KB
testcase_24 AC 108 ms
29,964 KB
testcase_25 AC 107 ms
29,904 KB
testcase_26 AC 112 ms
29,976 KB
testcase_27 AC 109 ms
29,964 KB
testcase_28 AC 111 ms
30,032 KB
testcase_29 AC 109 ms
29,980 KB
testcase_30 AC 109 ms
29,964 KB
testcase_31 AC 110 ms
29,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import *
from bisect import *
# from math import *
from collections import *
from heapq import *
from random import *
from decimal import *
import numpy as np
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
def MF(): return map(float, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LF(): return list(map(float, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

def main():
    n=II()
    ee=[input() for _ in range(n)]
    cnt=Counter(ee)
    max_cnt=max(cnt.values())
    if n>=2*max_cnt-1:print("YES")
    else:print("NO")

main()
0