結果
| 問題 | No.349 干支の置き物 |
| コンテスト | |
| ユーザー |
💕💖💞
|
| 提出日時 | 2016-09-10 13:38:37 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 2,000 ms |
| コード長 | 479 bytes |
| 記録 | |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 77,432 KB |
| 最終ジャッジ日時 | 2025-12-03 21:28:02 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
swap = {
"ne":"a",
"ushi":"b",
"tora":"c",
"u":"d",
"tatsu":"e",
"mi":"f",
"uma":"g",
"hitsuji":"i",
"saru":"j",
"tori":"k",
"inu":"l",
"i":"n"
}
import collections
import sys
count = collections.Counter
tgts = []
for _ in range(int(raw_input())):
i = raw_input()
tgts.append(swap[i])
#print count(tgts)
noise = sorted(count(tgts).values()).pop()
ents = sum(count(tgts).values()) - noise
if noise >= ents + 2:
print "NO"
sys.exit(0)
print "YES"
💕💖💞