結果
| 問題 | No.349 干支の置き物 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-29 22:47:15 |
| 言語 | Lua (LuaJit 2.1.1791890110) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 431µs | |
| コード長 | 264 bytes |
| 記録 | |
| コンパイル時間 | 5 ms |
| コンパイル使用メモリ | 9,748 KB |
| 実行使用メモリ | 9,896 KB |
| 最終ジャッジ日時 | 2026-10-15 12:59:47 |
| 合計ジャッジ時間 | 2,317 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
t = {}
n = io.read("*n", "*l")
for i = 1, n do
s = io.read()
if(t[s] == nil) then t[s] = 1 else t[s] = t[s] + 1 end
end
max = 1
for k, v in pairs(t) do
max = math.max(max, v)
end
if(max <= math.floor((n + 1) / 2)) then print("YES") else print("NO") end