結果

問題 No.349 干支の置き物
ユーザー 双六双六
提出日時 2020-08-09 00:13:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 475 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 82,324 KB
実行使用メモリ 55,720 KB
最終ジャッジ日時 2024-04-10 08:41:17
合計ジャッジ時間 2,320 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
54,400 KB
testcase_01 AC 37 ms
55,720 KB
testcase_02 AC 37 ms
53,760 KB
testcase_03 AC 37 ms
55,608 KB
testcase_04 AC 37 ms
54,108 KB
testcase_05 AC 37 ms
53,368 KB
testcase_06 AC 36 ms
54,448 KB
testcase_07 AC 37 ms
54,144 KB
testcase_08 AC 38 ms
54,648 KB
testcase_09 AC 37 ms
53,824 KB
testcase_10 AC 36 ms
54,188 KB
testcase_11 AC 36 ms
55,488 KB
testcase_12 AC 36 ms
55,476 KB
testcase_13 AC 37 ms
54,116 KB
testcase_14 AC 39 ms
54,428 KB
testcase_15 AC 38 ms
54,400 KB
testcase_16 AC 37 ms
55,248 KB
testcase_17 AC 38 ms
54,548 KB
testcase_18 AC 36 ms
55,384 KB
testcase_19 AC 36 ms
54,848 KB
testcase_20 AC 36 ms
53,616 KB
testcase_21 AC 38 ms
54,176 KB
testcase_22 AC 39 ms
53,668 KB
testcase_23 AC 38 ms
54,268 KB
testcase_24 AC 36 ms
54,664 KB
testcase_25 AC 36 ms
53,628 KB
testcase_26 AC 36 ms
54,960 KB
testcase_27 AC 37 ms
55,156 KB
testcase_28 AC 37 ms
55,412 KB
testcase_29 AC 37 ms
53,492 KB
testcase_30 AC 37 ms
53,668 KB
testcase_31 AC 37 ms
54,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	D = defaultdict(int)
	for i in range(N):
		A = input()
		D[A] += 1

	L = []
	for i in D:
		L.append(D[i])

	for i in L:
		if i >= (N + 3) // 2:
			print("NO")
			return

	print("YES")


if __name__ == '__main__':
	main()
0