結果
| 問題 | No.349 干支の置き物 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-29 22:47:15 |
| 言語 | Lua (LuaJit 2.1.1787165859) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 40µs | |
| コード長 | 264 bytes |
| 記録 | |
| コンパイル時間 | 28 ms |
| コンパイル使用メモリ | 9,904 KB |
| 実行使用メモリ | 10,044 KB |
| 最終ジャッジ日時 | 2026-09-19 22:32:26 |
| 合計ジャッジ時間 | 2,089 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
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